Interesting. Didn't notice that before. Here's what happens:

The PNG is decoded by the PNG codec in XML Graphics Commons. Even if the
PNG does not contain an explicit ICC color profile, the default sRGB
color profile is returned because it's a Java default. The problem with
Java's sRGB profile is that it's about 100KB in size even though there
are sRGB profiles which are merely 4KB in size (we include one for PDF/A
support). Currently FOP simply includes the ICC color profile if one is
returned. In the case of sRGB this is probably not necessary or we might
at least replace Java's profile with the embedded smaller one. The
result for ICC-aware readers should be the same.

To fix this, code needs to be added to identify Java's default sRGB
profile and to ignore/replace it when output files (not only PDF!) are
written.

On 28.04.2006 08:55:43 news wrote:
> Hello List,
> 
> If I include a grafic into my PDF (in this example a PNG) the resulting PDF
> filesize has an enormous diffenrence between FOP025 and FOP092 beta. When
> rendered with 0.25 the file's size is about 8kb. The same FO file results in
> an 108kb(!) big PDF file when rendered with 0.92
> beta!
> If I does'nt include a picture the filesize is about equal.
> 
> Both, FOP025 and FOP092 got the "jai_codec.jar" and "jai_core.jar" in there
> lib folder and FOPs classpath.
> 
> How can that happen? 
> I m storing the resulting PDFs into a database. A improvment of the
> resulting filesizes of factor 10 and over is really bad for me :(
> 
> with best redards,
> Jan


Jeremias Maerki


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

Reply via email to