I have an image that is RGB according to photoshop, although it looks black and white, gray scale. However, upon capturing the color space from IM, it believes it is a GRAY colorspace. I know it is not because of the channels. How does IM determine a Grayscale colorspace?
I have to convert the image to a particular color space based on what it comes in as, if I can not put confidence in correctly identifying that, then this is not good.
Possible bug with Grayscale colorspace?
Re: Possible bug with Grayscale colorspace?
ImageMagick declares a grayscale colorspace if, for each pixel, red = green and green = blue. If you can identify a pixel where this condition is not true, but ImageMagick still claims its grayscale, that would be a bug in ImageMagick.
Re: Possible bug with Grayscale colorspace?
I have found many pixels in my image that has a colorspace of "DirectClassGray" that your scenario does not fit. It is very close but not true such that R=37,G=38,B=37 and so on. I have no encountered a deviance of more than 1 so far, and this is using the color dropper in Adobe PS CS3. I could share with you my image (it was a random google image) that photoshop cs3 declares as RGB but imageMagic declares as greyscale.
-Pete
-Pete
Re: Possible bug with Grayscale colorspace?
Yes, please. Post a URL to your image here so we can download it and inspect it.
Re: Possible bug with Grayscale colorspace?
It was taken from a google image search just on a whim. You may notice most of the pixels are exactly equal, but I did find a many there were not, but close, as mentioned.
EDIT - (I will have to upload the image to my personal server which I can't access from here, I incorrectly linked the wrong image a moment ago. I will do so asap but likely not before saturday.)
thank you,
-Pete
EDIT - (I will have to upload the image to my personal server which I can't access from here, I incorrectly linked the wrong image a moment ago. I will do so asap but likely not before saturday.)
thank you,
-Pete
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Possible bug with Grayscale colorspace?
More than likely that image was JPEG (or TIFF with JPEG compression). Which due to its 'lossy' compression method can result in in-exact colors, especialling in the Blue channel...
See IM Examples, JPEG Compression
http://imagemagick.org/Usage/formats/#jpg
See IM Examples, JPEG Compression
http://imagemagick.org/Usage/formats/#jpg
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/