This is a known issue (at least, I am familiar with it). I assume you are using jai_imageio.jar. The behavior is due to a bug in JAI (see http://www.java.net/node/702556) that causes the images to be treated as RGB + Alpha. The reason you do not see the problem when producing PDF is due to the fact that FOP uses a native image loader if the output is PDF (i.e., it does not use JAI).

I was not aware of the issue you point out with RGB TIFFs and deflate compression. Can you provide example images with flate and LZW compression?

On 5/17/13 3:52 PM, Luca Bellonda wrote:
Hi to all, I am facing problems using images with FOP with afp renderer.

Specifically, a JPEG or TIFF with CMYK colorspace ends in wrong colors, even if
the cmyk="true" attribute is added to the configuration file.

When using a TIFF (RGB) with "deflate" compression type, the picture is mostly black, using LZW compression is OK.

Tested with 1.1 and the nightly build of FOP.

Enclosed here the configuration file:

<?xml version="1.0"?>
<fop version="1.0">
  <base>.</base>
  <source-resolution>72</source-resolution>
  <target-resolution>72</target-resolution>
  <default-page-settings height="11in" width="8.26in"/>
  <renderers>
    <renderer mime="application/x-afp">
<renderer-resolution>240</renderer-resolution>
      <images mode="color" cmyk="true" />
    </renderer>
  </renderers>
</fop>

Thanks

Reply via email to