Page 1 of 1

Working with YCrCb

Posted: 2008-06-25T14:56:39-07:00
by drewvy
I need to look at (and alter) the Y, Cr, and Cb values for a given pixel. The only structure I see is PixelPacket with RGB as member variables.

In my code I load an image that is in RGB space and I then call... SetImageColorspace(my_image, YCbCrColorspace); ...to convert it.

I then tried to get the pixel info with this call... pixels=GetImagePixels(my_image,0,loop,my_image->columns,1);

Is there a way to do this with ImageMagick calls?

~Drew

Re: Working with YCrCb

Posted: 2008-06-25T22:38:44-07:00
by anthony
you map the image into YCrCb colorspace, the Y will be in the first 'Red' channel and so on. when dinished you can map back into RGB colorspace.

See IM Examples, basics, colorspace
http://imagemagick.org/Usage/basics/#colorspace