use MagickExportImagePixels after transform
Posted: 2011-03-10T16:10:28-07:00
hello.
i have a problem when i use MagickExportImagePixels after a MagickResizeImage...
the input is a color image RGB 8bit, the outcome is a grayscalish-image with some color-lines, and the image is sheared...
using the code below:
if i spare the transformation out, the image is colored and not sheared.
thanks for any help.
inx
i have a problem when i use MagickExportImagePixels after a MagickResizeImage...
the input is a color image RGB 8bit, the outcome is a grayscalish-image with some color-lines, and the image is sheared...
using the code below:
Code: Select all
size_t width,height;
MagickBooleanType status;
MagickWand *magick_wand = NULL;
unsigned char *Buffer = NULL;
magick_wand = NewMagickWand();
MagickReadImage(magick_wand,"tt.jpg");
MagickResizeImage(magick_wand,774,518,LanczosFilter,1.0);
width = MagickGetImageWidth(magick_wand);
height = MagickGetImageHeight(magick_wand);
//correct size here: 774x518px
Buffer = malloc(3*width*height);
// Export the whole image
MagickExportImagePixels(magick_wand,0,0,width,height,"RGB",CharPixel,Buffer);
if i spare the transformation out, the image is colored and not sheared.
thanks for any help.
inx