I am wondering how I can get RGB values of pixels(JPEG) using JMagick.
getColormap returns null...
How to get RGB values using JMagick?
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: How to get RGB values using JMagick?
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.
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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: How to get RGB values using JMagick?
Well, is there any way to get the RGB value of Jpeg by JMagick?
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: How to get RGB values using JMagick?
generally read it in and output the image using txt: (enumerated pixel format)
See http://www.imagemagick.org/Usage/files/#txt
See http://www.imagemagick.org/Usage/files/#txt
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/