For FOP, the PNG is technically fine and everything is working as
expected. If I open the resized PNG in a graphics editor and save it
again under a different name, the PNG becomes a 7KB file. I assume
you're just seeing differences in compression capabilities between
various image tools. PNG basically uses the ZLib compression algorithm
with some "predictor functions" to improve compression ratios. If I had
to guess I'd say that ImageMagick only has a crude compressor for PNG
(without predictors) and that's why you get a much larger file.
The image quality simply comes from ImageMagick, too, because FOP just
embeds the image as is (pixel per pixel) into the PDF.
In short: there's nothing wrong with FOP.
But why don't you just try to scale down the picture using FO means?
That should be easier. Yeah, and upgrade to 0.92beta. :-)
On 03.11.2006 23:30:41 Brad Smith wrote:
> Hello,
>
> I am trying to add a script to our pre-processing regimen that uses
> the imagemagick tools to automatically resize images that are too
> large for the PDFs we generate eg:
>
> convert -resize ${NEW_WIDTH}x $FILE $FILE
>
> for files that are too wide. After resizing a file it looks fine when
> viewed in any image viewer. However, when included in a fop'd xslfo
> file the version in the pdf looks... strange, like a bad photocopy.
> I've attached an unchanged and a resized image for the adventurous.
> Try including them both in a document and see if you get the same
> result.
>
> >From everything I can tell, the resized image is a normal png, but if
> I perform the same resize in eg Gimp, the resulting file looks a
> little fuzzy in the pdf but is otherwise fine. So obviously
> ImageMagick is doing something to the png that other viewers are ok
> with, but not fop. On a probably related note, look how much bigger
> the imagemagick'd file is than the original (27k vs <1b, in case this
> list strips attachments)!
>
> Does anyone have any insight into what's going on here? I'm on FC6
> using fop-0.91beta-2 and ImageMagick-6.2.8.0 if that's relevant.
>
> --Brad
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]