Code: Select all
MagickQuantizeImage(image_wand,256,GRAYColorspace,0,MagickFalse,MagickFalse);
I later used that same file but now I need to use the grayscale value of the pixels. The grayscale value is supposed to be any of the RGB colors since they're supposed to be the same. Yet when I use this
Code: Select all
PixelGetRed(pixels_wand[i])
Then I used the image without a grayscale conversion and I got the same. The weird thing is that the image is mostly yellow so I would expect PixelGetRed and PixelGetGreen to return 1 both but I mostly get 1 on Red and 0 elsewhere or 1 on Blue and 0 elsewhere.
Any ideas what might be happening?