commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dam...@apache.org
Subject svn commit: r1309242 - /commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/jpeg/JpegImageParser.java
Date Wed, 04 Apr 2012 04:46:44 GMT
Author: damjan
Date: Wed Apr  4 04:46:43 2012
New Revision: 1309242

URL: http://svn.apache.org/viewvc?rev=1309242&view=rev
Log:
Fix the PhysicalWidthDpi calculation for JPEG images.

Jira issue key: SANSELAN-70
Submitted by: Tars Joris <tars dot joris at inventivedesigners dot com>


Modified:
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/jpeg/JpegImageParser.java

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/jpeg/JpegImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/jpeg/JpegImageParser.java?rev=1309242&r1=1309241&r2=1309242&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/jpeg/JpegImageParser.java
(original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/jpeg/JpegImageParser.java
Wed Apr  4 04:46:43 2012
@@ -792,7 +792,7 @@ public class JpegImageParser extends Ima
 
         if (units_per_inch > 0)
         {
-            PhysicalWidthDpi = (int) Math.round(x_density / units_per_inch);
+            PhysicalWidthDpi = (int) Math.round(x_density * units_per_inch);
             PhysicalWidthInch = (float) (Width / (x_density * units_per_inch));
             PhysicalHeightDpi = (int) Math.round(y_density     * units_per_inch);
             PhysicalHeightInch = (float) (Height / (y_density * units_per_inch));



Mime
View raw message