PNGReader.st
changeset 3903 754f50ffb404
parent 3900 a95276d36ce8
child 3904 f9baf7a194d9
--- a/PNGReader.st	Fri Feb 17 13:11:15 2017 +0100
+++ b/PNGReader.st	Fri Feb 17 14:18:40 2017 +0100
@@ -248,18 +248,18 @@
     paletteAlphaEntries notNil ifTrue:[
         "/ this vector now provides alpha values.
         "/ for now, we can only deal with 0/255 alpha values...
-        (paletteAlphaEntries conform:[:a | (a == 0) or:[a == 255]]) ifFalse:[
-            "/ must generate real alpha info (eg. rgba)
-        ] ifTrue:[
-            self generateMaskFromPaletteAlphaEntries
-        ].    
+        self generateMaskFromPaletteAlphaEntries
     ].
     
     "
      PNGReader fromFile:'/home/cg/libpng-0.89c/pngtest.png'
+
+     Verbose := true.
+     PNGReader fromFile:(RegressionTests::ImageReaderTest packageDirectory construct:'testData/pngImages/tbbn3p08.png')
+     
     "
 
-    "Modified: / 17-02-2017 / 11:34:01 / cg"
+    "Modified (comment): / 17-02-2017 / 14:16:25 / cg"
 ! !
 
 !PNGReader methodsFor:'reading-private'!
@@ -273,7 +273,7 @@
         "/ if there is only one entry to care for...
         (paletteAlphaEntries occurrencesOf:0) == 1 ifTrue:[
             (paletteAlphaEntries conform:[:alpha | (alpha == 0) or:[alpha == 255]]) ifTrue:[
-                mask := self class buildMaskFromColor:(paletteAlphaEntries indexOf:0)-1 for:data width:width height:height.
+                image mask:(self class buildMaskFromColor:(paletteAlphaEntries indexOf:0)-1 for:data width:width height:height).
                 ^ self
             ].    
         ].    
@@ -320,7 +320,7 @@
     ].
 
     "Created: / 17-02-2017 / 08:07:04 / cg"
-    "Modified: / 17-02-2017 / 11:55:57 / cg"
+    "Modified: / 17-02-2017 / 14:17:24 / cg"
 !
 
 getChunk