Rank: Member
Groups: Member
Joined: 5/12/2004(UTC) Posts: 6
|
I am passing a byte array that represents a System.Drawing.Image to a class in order to performing some transformations. Here is the code snippet of interest: Code://_masterImage is the incoming byte array
Aurigma.GraphicsMill.BitmapClass insideImg = new Aurigma.GraphicsMill.BitmapClass();
MemoryStream myFStream = new MemoryStream(_masterImage);
insideImg.LoadFromStream(myFStream);
myFStream.Flush();
myFStream.Close();
I keep obtaining the following error: Method LoadFromStream failed. Passed argument does not supports IStream interface. I have tried MemoryStream, FileStreams, converting to objects to streams - nothing works. Can you please tell me what I am missing?!? Thanks. Ken Edited by user Monday, December 24, 2007 5:29:01 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Member
Groups: Member
Joined: 5/12/2004(UTC) Posts: 6
|
Never mind! I was being stupid - I needed to use the LoadFromMemory since I already had the byte array.
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 7/28/2003(UTC) Posts: 1,659
Thanks: 5 times Was thanked: 76 time(s) in 74 post(s)
|
You can also convert System.Drawing.Bitmap to GraphicsMill.Bitmap following way: View post |
Best regards, Fedor Skvortsov
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 7/28/2003(UTC) Posts: 1,659
Thanks: 5 times Was thanked: 76 time(s) in 74 post(s)
|
We have released Aurigma Graphics Mill for .NET which is native .NET component. Now you can directly cast classes from Aurigma.GraphicsMill and System.Drawing namespaces each other. You can find more about Graphics Mill for .NET here. |
Best regards, Fedor Skvortsov
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.