Posted: 2006-03-28T13:09:14-07:00
You have a few mistakes in your code. When you call MagickGetImageBlob() you need to specify an image format and depth so instead of However, a more efficient way is to call MagickGetImagePixels() which always returns raw image pixels.
To correct for the upside down image, simply call MagickFlipImage().
- unsigned char * data = MagickGetImageBlob(magick_wand,&length);
Code: Select all
MagickSetImageDepth(magick_wand,8);
MagickSetImageFormat(magick_wand,"RGB");
data = MagickGetImageBlob(magick_wand,&length);
To correct for the upside down image, simply call MagickFlipImage().