Hello, my original HTML document has an image and I get the next Exception when I do pd4ml.render(...) :
sun.awt.image.ImageFormatException: Unsupported color conversion request
I tried by changing the image by another with similar width and height but less file size (the original image that fails is 138 KB and the new one is 14KB). When I change it, it works fine.
How can I make it to work with the original size image? It has to be this image because it is from an external server and I cannot change the quality or size.
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.
It is probably a bit tricky, but you may implement on-a-fly image converter utilizing PD4ML custom resource loader technique post43.html and JAI library.
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