Page 1 of 1

How to get RGB values using JMagick?

Posted: 2012-07-25T09:16:40-07:00
by ygnhzeus
I am wondering how I can get RGB values of pixels(JPEG) using JMagick.
getColormap returns null...

Re: How to get RGB values using JMagick?

Posted: 2012-08-07T19:03:37-07:00
by anthony
JPEG does not actually store RGB values!!!

It does not even really store color values at all.. What it stores are small 8x8 or 16x16 fourier transforms of the image values in a special colorspace. I forget what colorspace that is at the moment, but it is less sensitive in blues.

The jpeg library decodes those values, typically to either sRGB or CMYK, or some other colorspace as determined by the JPEG's color profile. IM never actually sees the intermedite values, only the decoded (and slightly fuzzy) values that results.

Re: How to get RGB values using JMagick?

Posted: 2012-08-08T18:05:57-07:00
by ygnhzeus
Well, is there any way to get the RGB value of Jpeg by JMagick?

Re: How to get RGB values using JMagick?

Posted: 2012-08-08T18:52:07-07:00
by anthony
generally read it in and output the image using txt: (enumerated pixel format)
See http://www.imagemagick.org/Usage/files/#txt