Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
ktola  
#1 Posted : Wednesday, May 19, 2004 10:06:00 PM(UTC)
ktola

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

ktola  
#2 Posted : Wednesday, May 19, 2004 10:24:00 PM(UTC)
ktola

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.
Fedor  
#3 Posted : Wednesday, May 19, 2004 10:32:00 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,530

Thanks: 4 times
Was thanked: 53 time(s) in 52 post(s)
You can also convert System.Drawing.Bitmap to GraphicsMill.Bitmap following way:

View post
Best regards,
Fedor Skvortsov
Fedor  
#4 Posted : Sunday, January 02, 2005 9:50:00 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,530

Thanks: 4 times
Was thanked: 53 time(s) in 52 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
Users browsing this topic
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.