PNGReader.st
changeset 3724 4a753c4710c9
parent 3673 22cb72dfcaf9
child 3727 35e32e0e69f5
child 3762 036884e46f66
--- a/PNGReader.st	Wed Aug 03 12:42:42 2016 +0200
+++ b/PNGReader.st	Mon Aug 08 14:06:04 2016 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1996 by Claus Gittinger
               All Rights Reserved
@@ -1112,13 +1114,11 @@
 !
 
 writeIHDRChunk
-    |colorType|
-
     ((photometric == #whiteIs0) or:[ (photometric == #blackIs0)]) ifTrue:[
         colorType := 0.
         samplesPerPixel > 1 ifTrue:[ colorType := colorType + 4].  "/ +alpha
     ].
-    (photometric == #rgb) ifTrue:[
+    ((photometric == #rgb) or:[(photometric == #rgba)]) ifTrue:[
         colorType := 2.
         samplesPerPixel > 3 ifTrue:[ colorType := colorType + 4].  "/ +alpha
     ].