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!
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!