Oh, ok... so I cannot do anything now because the picture URL is in an external server and I cannot manage it. The image will change depending the user selection so I cannot save and modify the picture in my own server.
Thank you so much and I will try it again in some months.
I get always false. Debugging my code, I see that the color space is returned as RGB, so this condition cannot be true.
To arrive to this point, I get the image from the external server and I save it in my local server. It is recommended that the final solution doesn't do that and work always in memory without save temp files.
The picture saved in my hard drive has wrong colours.
I opened the hi-res image in Photoshop and made sure: the image color space is CMYK.
> img.getColorModel().getColorSpace().getType() == ColorSpace.TYPE_CMYK The request would make sense if you have a correctly instantiated Image object. But in your case it has internally thrown a sun.awt.image.ImageFormatException. So I suspect "img" object has default values of some properties.
If I have time today or tomorrow I'll try to create for you an "on-a-fly" converter from CMYK to RGB