PNGReader.st
changeset 3461 eb5a53c6b5b2
parent 3437 4e1cf7b6b492
child 3505 af4fb19df063
child 3554 f1820748e4a9
--- a/PNGReader.st	Thu Apr 23 03:47:42 2015 +0000
+++ b/PNGReader.st	Thu Apr 23 23:25:39 2015 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1996 by Claus Gittinger
               All Rights Reserved
@@ -11,6 +13,8 @@
 "
 "{ Package: 'stx:libview2' }"
 
+"{ NameSpace: Smalltalk }"
+
 ImageReader subclass:#PNGReader
 	instanceVariableNames:'colorType bitsPerChannel depth compressionMethod filterMethod
 		interlaceMode bytesPerScanline globalDataChunk thisScanline
@@ -827,18 +831,18 @@
 
     ((photometric == #whiteIs0) or:[ (photometric == #blackIs0)]) ifTrue:[
         colorType := 0.
-        samplesPerPixel size > 1 ifTrue:[ colorType := colorType + 4].  "/ +alpha
+        samplesPerPixel > 1 ifTrue:[ colorType := colorType + 4].  "/ +alpha
     ].
     (photometric == #rgb) ifTrue:[
         colorType := 2.
-        samplesPerPixel size > 3 ifTrue:[ colorType := colorType + 4].  "/ +alpha
+        samplesPerPixel > 3 ifTrue:[ colorType := colorType + 4].  "/ +alpha
     ].
     (photometric == #palette) ifTrue:[
         colorType := 3.
-        samplesPerPixel size > 1 ifTrue:[ colorType := colorType + 4].  "/ +alpha
+        samplesPerPixel > 1 ifTrue:[ colorType := colorType + 4].  "/ +alpha
     ].
     colorType isNil ifTrue:[
-        self error:'unjandled photometric'
+        self error:'unhandled photometric'
     ].
 
     self 
@@ -902,11 +906,11 @@
 !PNGReader class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/PNGReader.st,v 1.36 2014-12-22 12:00:09 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/PNGReader.st,v 1.37 2015-04-23 21:25:39 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview2/PNGReader.st,v 1.36 2014-12-22 12:00:09 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/PNGReader.st,v 1.37 2015-04-23 21:25:39 stefan Exp $'
 ! !