Page 1 of 1

Writing PNM format to a Blob

Posted: 2008-01-29T17:16:41-07:00
by drc
I'm new to this library so I apologize if this question is a simple one.

I started playing with the MagickNet which I know isn't supported on this site, but I saw a behavior that seems to be the same with the core library. I would like to write a blob in memory from an image loaded from a jpeg file and have the new blob in an uncompressed PNM format. I've tried both ImageToBlob() and WriteImage(). It seems that no matter what the settings, the blob that is created is still in compressed jpeg format. But if I first write the data to a PNM file "somefile.pnm" and then turn around and write the same image to a Blob with magick set to "PNM", it works.

Not sure if this makes sense, but at this point it seems I need to take a file I/O hit first in order to get an in-memory Blob in PNM format.

thanks for any help,
dan