Bug 47157 - ImageIO-based images are blurry when rendering a PDF
Summary: ImageIO-based images are blurry when rendering a PDF
Status: NEW
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: pdf (show other bugs)
Version: trunk
Hardware: All All
: P3 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on: 47151
Blocks:
  Show dependency tree
 
Reported: 2009-05-05 10:16 UTC by David Green
Modified: 2012-04-07 01:51 UTC (History)
0 users



Attachments
screenshot showing rendered image (68.38 KB, image/png)
2009-05-05 10:17 UTC, David Green
Details
xsl-fo (1.46 KB, text/plain)
2009-06-24 09:35 UTC, David Green
Details
original image (21.48 KB, image/png)
2009-06-24 09:35 UTC, David Green
Details
resulting pdf (18.88 KB, application/octet-stream)
2009-06-24 09:36 UTC, David Green
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Green 2009-05-05 10:16:02 UTC
When using PNG or JPG images are blurry when rendering PDF output.  The problem appears to be related to image size computations even when scaling is not used, however this may not be the only factor.  Running with a patched version of FOP (with a fix for bug 27151) images are still blurry (though slightly better than running without the patch).
Comment 1 David Green 2009-05-05 10:17:20 UTC
Created attachment 23613 [details]
screenshot showing rendered image

Screenshot showing rendered image beside the original.  Notice how the original is crisp, whereas the rendered image is blurry.
Comment 2 Max Berger 2009-05-11 23:31:20 UTC
David,

just for completeness: Which version of FOP did you use for the left image, and which one for the right? Is the .fo file the same on both?
Comment 3 David Green 2009-05-12 11:36:47 UTC
There was only one fo file.  The attached screenshot shows the original image as it is displayed in an image viewing program (not related to FO or FOP), and the image as it appears when viewing it via a PDF viewer after rendering with FOP.  So there was only one fo file, and one rendering process.

I built FOP from source.  SVN info gives the following:

bc. 
URL: http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
Repository Root: http://svn.apache.org/repos/asf
Repository UUID: 13f79535-47bb-0310-9956-ffa450edef68
Revision: 771415
Node Kind: directory
Schedule: normal
Last Changed Author: vhennebert
Last Changed Rev: 770635
Last Changed Date: 2009-05-01 04:19:36 -0700 (Fri, 01 May 2009)
Comment 4 David Green 2009-06-23 15:26:11 UTC
(In reply to comment #0)
> (with a fix for bug 27151) images are still blurry 

correction: bug 47151

Is there any hope of someone looking into this issue?  Image quality is critical.  It's hard to imagine anyone using FOP with images in its current state, since almost every image comes out blurry.
Comment 5 Andreas L. Delmelle 2009-06-23 15:35:39 UTC
(In reply to comment #4)
> correction: bug 47151
> 
> Is there any hope of someone looking into this issue?  Image quality is
> critical.  It's hard to imagine anyone using FOP with images in its current
> state, since almost every image comes out blurry.

Apologies for the late reply. Is it possible to attach the image itself and the PDF result? 
That would be of great help to investigate this further.

Thanks!
Comment 6 David Green 2009-06-24 09:35:35 UTC
Created attachment 23868 [details]
xsl-fo

xsl-fo used to produce the issue attached
Comment 7 David Green 2009-06-24 09:35:55 UTC
Created attachment 23869 [details]
original image
Comment 8 David Green 2009-06-24 09:36:27 UTC
Created attachment 23870 [details]
resulting pdf

attached pdf after processing with FOP/Batik
Comment 9 David Green 2009-06-24 09:37:07 UTC
Please let me know if there's anything else you need.
Comment 10 Andreas L. Delmelle 2009-06-24 11:40:48 UTC
(In reply to comment #9)
> Please let me know if there's anything else you need.

What you sent was perfect. Just what was needed to be able to confirm the issue, and start looking.

From what I could tell at first glance, this is not merely the result of the rounding error in bug 47151. 
The ImageInfo reports a size of 269966 x 250969 mpt, or 3.7495278 x 3.4856806in, which seems to match what an image viewer reports for the same PNG: 270x251px at 72.01dpi, give or take a few millipoints... That said, the remark in bug 47151 is entirely on the spot.

Did you, by any chance, check whether the effect persists in case the PDF is printed?
Comment 11 David Green 2009-06-24 14:48:03 UTC
(In reply to comment #10)
> What you sent was perfect. Just what was needed to be able to confirm the issue,
> and start looking.

Great!

> Did you, by any chance, check whether the effect persists in case the PDF is printed?

No, I didn't try printing.
Comment 12 Glenn Adams 2012-04-07 01:41:33 UTC
resetting P2 open bugs to P3 pending further review