commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dam...@apache.org
Subject svn commit: r1441180 - /commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngImageParser.java
Date Thu, 31 Jan 2013 20:26:06 GMT
Author: damjan
Date: Thu Jan 31 20:26:06 2013
New Revision: 1441180

URL: http://svn.apache.org/viewvc?rev=1441180&view=rev
Log:
PNGs with a transparency filter also need an alpha channel.


Modified:
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngImageParser.java

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngImageParser.java?rev=1441180&r1=1441179&r2=1441180&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngImageParser.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngImageParser.java
Thu Jan 31 20:26:06 2013
@@ -778,7 +778,8 @@ public class PngImageParser extends Imag
             final int bitsPerPixel = bitsPerSample * samplesPerPixel;
 
             final boolean hasAlpha = colorType == COLOR_TYPE_GREYSCALE_WITH_ALPHA
-                    || colorType == COLOR_TYPE_TRUE_COLOR_WITH_ALPHA;
+                    || colorType == COLOR_TYPE_TRUE_COLOR_WITH_ALPHA
+                    || transparencyFilter != null;
 
             BufferedImage result;
             if (isGrayscale) {



Mime
View raw message