You mean the image from the external-graphic is lighter than the one
painted through SVG/Batik when you render the attached FO file to PNG
instead of PDF?

This has something to do with color management which is something I've
only started to understand. Bitmap image handling is optimized for PDF
(using decoded byte arrays instead of RenderedImage/BufferedImage for
bitmaps) and this is probably the first time we see the side-effect of
this. It's line 953 in Java2DRenderer where CS_LINEAR_RGB is used
instead of CS_sRGB. But just setting this to CS_sRGB is possibly wrong
in other cases. That's why I think the org.apache.fop.image package
needs to be refactored to use RenderedImage/BufferedImage.

The reason why the SVG/Batik-controlled image is appearing correctly:
Batik internally works properly with the AWT image infrastructure and
therefore preserves color space information which we currently don't in
FOP.

I will likely work on this in the next three months. But help is welcome,
of course.

On 21.09.2006 16:23:32 Peter wrote:
> Gentlepeople,
>  
> Using fop trunk.
>  
> When I include an image using external-graphic (tried both jpeg and gif) the
> image displays just fine when rendering to pdf. When rendering to png
> however the image looks much worse (not sure how to describe it, it looses
> contrast or something like that).
>  
> When I do the exact same thing but use batik to include the image it looks
> just fine.
>  
> Anyone any thoughts on this? 
>  
> Thanks,
>  
> Peter
>  
> PS  Here is an example 
<snip/>

Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to