PreloaderImageIO is used by ImageManager to get image information, including size (height and width) and DPI. Unfortunately ImageIOUtil.extractResolution() causes image sizes to be incorrect in some cases due to multiple floating point operations. This results in FOP rendering blurry images when creating PDFs.
Created attachment 23609 [details] candidate fix attached a candidate fix that eliminates a computation that causes loss of precision
Created attachment 23610 [details] mylyn/context/zip
Thanks for the patch. Would you mind also attaching a sample Image that demonstrates the issue you reported. Thanks!
Created attachment 23618 [details] updated patch with JUnit test
Created attachment 23619 [details] mylyn/context/zip
Created attachment 23620 [details] image used in JUnit
I've taken a look at this patch but I fail to see the difference before and after the patch (with David's PNG file). I know this "blur" issue has been reported more than once, but so far I cannot reproduce it. Can anyone provide screenshots and PDFs that demonstrate the issue?
Created attachment 25487 [details] Image test file The patch did not work for me. Here is the image I have been using.
Created attachment 25488 [details] PDF output And that one is the pdf output.
(In reply to comment #8) > Created an attachment (id=25487) [details] > Image test file > > The patch did not work for me. Here is the image I have been using. Hmm, so far the images presented here are all blurry to begin with. That's an effect from anti-aliasing. What I'm still missing is a screenshot that demonstrates that a (sharp) image embedded in a PDF is displayed in a blurry fashion.
(In reply to comment #10) > (In reply to comment #8) > > Created an attachment (id=25487) [details] [details] > > Image test file > > > > The patch did not work for me. Here is the image I have been using. > > Hmm, so far the images presented here are all blurry to begin with. That's an > effect from anti-aliasing. What I'm still missing is a screenshot that > demonstrates that a (sharp) image embedded in a PDF is displayed in a blurry > fashion. Seems you are right. Those images were generated using Microsoft Visio. I created some basic images using Gimp, got some more from internet, and they render much better.
I'm closing this issue due to lack of evidence that this patch solves anything. I'm still not convinced we have a problem here. Please reopen if anyone has a good test case.