pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1838332 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDImageXObject.java
Date Sat, 18 Aug 2018 15:03:27 GMT
Author: tilman
Date: Sat Aug 18 15:03:27 2018
New Revision: 1838332

URL: http://svn.apache.org/viewvc?rev=1838332&view=rev
Log:
PDFBOX-4267: SonarQube fix

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDImageXObject.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDImageXObject.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDImageXObject.java?rev=1838332&r1=1838331&r2=1838332&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDImageXObject.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDImageXObject.java
Sat Aug 18 15:03:27 2018
@@ -566,7 +566,7 @@ public final class PDImageXObject extend
                 if (isSoft)
                 {
                     rgba[3] = alphaPixel[0];
-                    if (matte != null && alphaPixel[0] != 0)
+                    if (matte != null && Float.compare(alphaPixel[0], 0) != 0)
                     {
                         rgba[0] = clampColor(((rgba[0] / 255 - matte[0]) / (alphaPixel[0]
/ 255) + matte[0]) * 255);
                         rgba[1] = clampColor(((rgba[1] / 255 - matte[1]) / (alphaPixel[0]
/ 255) + matte[1]) * 255);



Mime
View raw message