Welcome Guest Search | Active Topics | Members

savetomemory equivalent Options
katsumiliquer
Posted: Friday, January 21, 2005 2:11:00 PM
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!

Fedor
Posted: Friday, January 21, 2005 8:29:00 PM

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
Users browsing this topic
Guest


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.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Yet Another Forum.net version 1.9.1.6 running under Cuyahoga.
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.