You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xmlgraphics.apache.org by bu...@apache.org on 2009/05/04 23:36:44 UTC

DO NOT REPLY [Bug 47151] New: ImageManager.getImageInfo returns incorrect image size due multiple unit conversions in ImageIOUtil.extractResolution

https://issues.apache.org/bugzilla/show_bug.cgi?id=47151

           Summary: ImageManager.getImageInfo returns incorrect image size
                    due multiple unit conversions in
                    ImageIOUtil.extractResolution
           Product: XMLGraphicsCommons
           Version: 1.3.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Utilities
        AssignedTo: general@xmlgraphics.apache.org
        ReportedBy: dgreen99@gmail.com


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.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 47151] [PATCH] ImageManager.getImageInfo returns incorrect image size due multiple unit conversions in ImageIOUtil.extractResolution

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47151


Chris Bowditch <bo...@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ImageManager.getImageInfo   |[PATCH]
                   |returns incorrect image     |ImageManager.getImageInfo
                   |size due multiple unit      |returns incorrect image
                   |conversions in              |size due multiple unit
                   |ImageIOUtil.extractResoluti |conversions in
                   |on                          |ImageIOUtil.extractResoluti
                   |                            |on




--- Comment #3 from Chris Bowditch <bo...@hotmail.com>  2009-05-06 00:49:20 PST ---
Thanks for the patch. Would you mind also attaching a sample Image that
demonstrates the issue you reported. Thanks!

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 47151] [PATCH] ImageManager.getImageInfo returns incorrect image size due multiple unit conversions in ImageIOUtil.extractResolution

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47151

--- Comment #7 from Jeremias Maerki <je...@apache.org> 2010-03-18 09:27:35 UTC ---
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?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 47151] [PATCH] ImageManager.getImageInfo returns incorrect image size due multiple unit conversions in ImageIOUtil.extractResolution

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47151





--- Comment #4 from David Green <dg...@gmail.com>  2009-05-06 09:00:26 PST ---
Created an attachment (id=23618)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23618)
updated patch with JUnit test

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 47151] [PATCH] ImageManager.getImageInfo returns incorrect image size due multiple unit conversions in ImageIOUtil.extractResolution

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47151





--- Comment #5 from David Green <dg...@gmail.com>  2009-05-06 09:00:31 PST ---
Created an attachment (id=23619)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23619)
mylyn/context/zip

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 47151] [PATCH] ImageManager.getImageInfo returns incorrect image size due multiple unit conversions in ImageIOUtil.extractResolution

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47151

Jeremias Maerki <je...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX

--- Comment #12 from Jeremias Maerki <je...@apache.org> 2010-09-09 08:55:27 EDT ---
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.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 47151] ImageManager.getImageInfo returns incorrect image size due multiple unit conversions in ImageIOUtil.extractResolution

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47151


David Green <dg...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |47157




-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 47151] [PATCH] ImageManager.getImageInfo returns incorrect image size due multiple unit conversions in ImageIOUtil.extractResolution

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47151

--- Comment #11 from Nicolas <ni...@gmail.com> 2010-05-31 03:06:24 EDT ---
(In reply to comment #10)
> (In reply to comment #8)
> > Created an attachment (id=25487)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?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.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 47151] [PATCH] ImageManager.getImageInfo returns incorrect image size due multiple unit conversions in ImageIOUtil.extractResolution

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47151





--- Comment #6 from David Green <dg...@gmail.com>  2009-05-06 09:01:06 PST ---
Created an attachment (id=23620)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23620)
image used in JUnit

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 47151] [PATCH] ImageManager.getImageInfo returns incorrect image size due multiple unit conversions in ImageIOUtil.extractResolution

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47151

--- Comment #8 from Nicolas <ni...@gmail.com> 2010-05-27 03:19:11 EDT ---
Created an attachment (id=25487)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25487)
Image test file

The patch did not work for me. Here is the image I have been using.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 47151] [PATCH] ImageManager.getImageInfo returns incorrect image size due multiple unit conversions in ImageIOUtil.extractResolution

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47151

--- Comment #9 from Nicolas <ni...@gmail.com> 2010-05-27 03:20:36 EDT ---
Created an attachment (id=25488)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25488)
PDF output

And that one is the pdf output.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 47151] [PATCH] ImageManager.getImageInfo returns incorrect image size due multiple unit conversions in ImageIOUtil.extractResolution

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47151

--- Comment #10 from Jeremias Maerki <je...@apache.org> 2010-05-30 10:24:35 EDT ---
(In reply to comment #8)
> Created an attachment (id=25487)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?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.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 47151] ImageManager.getImageInfo returns incorrect image size due multiple unit conversions in ImageIOUtil.extractResolution

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47151





--- Comment #1 from David Green <dg...@gmail.com>  2009-05-04 15:15:13 PST ---
Created an attachment (id=23609)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23609)
candidate fix

attached a candidate fix that eliminates a computation that causes loss of
precision

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org