Microsoft.Ink.Load

K

Kit

I created a website. We stored ink into the database. I want to retrieve
the ink and convert it to an image. I am having trouble with it. This is
what I did.


byte[] b = GetTheInkFromDB;

if (b != null && b.Length != 0)
{

Microsoft.Ink.Ink ink = new Ink();
ink.Load(b);
byte[] gifbytes = ink.Save(PersistenceFormat.Gif, CompressionMode.Maximum);
ink.Dispose();
MemoryStream img_stream = new MemoryStream(gifbytes);
Image img = System.Drawing.Image.FromStream(img_stream);
img_stream.Close();

}



However, everytime it goes to ink.Load() an exception is thrown! It says:
"Value does not fall within the expected range." I am doing this in asp.net.
I don't know why I am getting this. Thank you guys!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top