Rank: Member Groups: Member
Joined: 1/20/2005 Posts: 4 Points: 0
|
anyone know of an equivalent method in 3.0 .net to the graphics mill 2.0 bitmap.savetomemory() method?
i'm trying to build a function that returns the image in memory. i thought it might be savestate() but that doesn't appear to do the job...
thanks!
|
 Rank: Advanced Member Groups: Administration
, Member
Joined: 7/28/2003 Posts: 1,254 Points: -345 Location: WA, US
|
You can use following code: [Visual Basic] Code:
Dim stream As New System.IO.MemoryStream
bitmap.Save(stream, New Aurigma.GraphicsMill.Codecs.JpegEncoderOptions(70, False))
Dim imageData As Byte() = stream.GetBuffer()
[C#] Code:
System.IO.MemoryStream stream = new System.IO.MemoryStream();
bitmap.Save(stream, new Aurigma.GraphicsMill.Codecs.JpegEncoderOptions(70, false));
byte[] imageData = stream.GetBuffer();
Best regards, Fedor Skvortsov
|