pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1798879 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
Date Thu, 15 Jun 2017 20:52:00 GMT
Author: tilman
Date: Thu Jun 15 20:52:00 2017
New Revision: 1798879

URL: http://svn.apache.org/viewvc?rev=1798879&view=rev
Log:
PDFBOX-3523: revert 1763621 due to lack of feedback, thus reenable high quality interpolation
if image is scaled up by ctm AND xform

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java?rev=1798879&r1=1798878&r2=1798879&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java Thu
Jun 15 20:52:00 2017
@@ -892,10 +892,8 @@ public class PageDrawer extends PDFGraph
 
         if (!pdImage.getInterpolate())
         {
-            Matrix m = new Matrix(xform);
-            m.concatenate(ctm);
-            boolean isScaledUp = pdImage.getWidth() < Math.round(Math.abs(m.getScalingFactorX()))
||
-                                pdImage.getHeight() < Math.round(Math.abs(m.getScalingFactorY()));
+            boolean isScaledUp = pdImage.getWidth() < Math.round(at.getScaleX()) ||
+                                 pdImage.getHeight() < Math.round(at.getScaleY());
 
             // if the image is scaled down, we use smooth interpolation, eg PDFBOX-2364
             // only when scaled up do we use nearest neighbour, eg PDFBOX-2302 / mori-cvpr01.pdf



Mime
View raw message