Manuel Mall wrote:
This is probably more a Batik question but as I encountered it in the FOP context and Batik people are on this list here we go:

When decoding a TIFF image (black / white fax) using Batik and then looking at the returned color space, e.g.
  <image>.getColorModel().getColorSpace();
that color space has a profile of java.awa.color.ICC_ProfileRGB.

   Well I'm not sure where FOP taps into the Batik image
decoders but most likely the _image_ returned is an RGB image
in the sRGB color space.  Unlike FOP Batik often needs to do
significant image processing on the images (filters, compositing etc).
As a result we tend to convert as soon as possible into RGBA to
simplify later processing.

However, I would have expected a color space of ICC_ProfileGray. This is sort of important as the correct color space must be set on the image object in the PDF. I currently set it manually but thats not ideal.

   The two main options are to either bypass the Batik 'decoding'
and use the TIFF image codec directly or to use the TIFF directory
to figure out what colorspace the underlying TIFF data is in.

Reply via email to