Technology Questions

Go Back   Technology Questions > Hardware Questions > Mobile Computers > Tablet PC > Tablet PC Software > Tablet PC Developers

Tablet PC Developers Show off your work while discussing with others how to create ink enabled applications.

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 01-19-2009, 01:00 PM
Kit
Newsgroup Contributor
 
Posts: n/a
Have problem to save as a gif format

Hi Guys,

I am hoping someone can help me out. The ink is saved in the database. I
want to retrieve it and convert it to a gif image which will be display on a
web page. The web page is running on IIS 7.

When I call this part of the code:
byte[] inkArray = oInk.Ink.Save(Microsoft.Ink.PersistenceFormat.Gif) ;

an exception is thrown: "Value does not fall within the expected range."

However, if I changed the persistence format to
"Microsoft.Ink.PersistenceFormat.InkSerializedForm at" instead of GIF, I don't
get the exception but I don't want that format. Does it have to do with IIS
7? What do I need to do? I am really stuck! Thank you so much in advance!!
The code is fine when I am running local on my machine and not on IIS.

CODE:

byte[] b = RetrieveInkBytesFromDB;

if (b != null && b.Length != 0)
{
oInk = new Microsoft.Ink.InkOverlay();
oInk.AttachMode = InkOverlayAttachMode.InFront;
oInk.EditingMode = InkOverlayEditingMode.Ink;
oInk.EraserMode = InkOverlayEraserMode.PointErase;
oInk.Enabled = false;

oInk.Ink.Load(b);
byte[] inkArray = oInk.Ink.Save(Microsoft.Ink.PersistenceFormat.Gif) ;
string tmpFile = Server.MapPath(@"images\comments.gif");
FileFunctions.SaveBinaryToFile(tmpFile,
oInk.Ink.Save(Microsoft.Ink.PersistenceFormat.Gif) );
}

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 01-19-2009, 01:00 PM
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
can you save resumes as .doc format in Microsoft word Professional JaymeLea Microsoft Office 2 12-03-2007 09:10 PM
Auto/Force save to 2003 .doc format Joe Letter Microsoft Office 2 10-24-2007 03:10 PM
Change default Save As format Bob Newman Microsoft Office 1 10-21-2007 02:00 PM
Always save in 2003 format? Wally Microsoft Office 1 03-09-2007 11:30 AM
Default to save as 2003 format? boe Microsoft Office 3 02-15-2007 12:03 PM


New To Technology Questions? Do You Need Help with Your Computer or Device? Do You Need Help with this site?

All times are GMT -8. The time now is 03:38 AM.


2003 - 2009 All Rights Reserved. Technology Questions

Search Engine Friendly URLs by vBSEO 3.3.0