WindowsIconReader.st
changeset 3931 4291708939e9
parent 3920 1bbb4d6fff20
child 3988 1bc80a8c7566
--- a/WindowsIconReader.st	Wed Feb 22 21:22:56 2017 +0100
+++ b/WindowsIconReader.st	Thu Feb 23 03:05:09 2017 +0100
@@ -1457,16 +1457,20 @@
     ].
     
     inDepth == 24 ifTrue:[
-        bytesPerRow := width * 3
+        bytesPerRow := width * 3.
+        samplesPerPixel := 3.
     ] ifFalse:[
         inDepth == 16 ifTrue:[
-            bytesPerRow := width * 2
+            bytesPerRow := width * 2.
+            samplesPerPixel := 3.
         ] ifFalse:[
             inDepth == 32 ifTrue:[
-                bytesPerRow := width * 4
+                bytesPerRow := width * 4.
+                samplesPerPixel := 4.
             ] ifFalse:[
                 bitsPerSample := Array with:inDepth.
-                bytesPerRow := self bytesPerRow
+                bytesPerRow := self bytesPerRow.
+                samplesPerPixel := 1.
             ].
         ].
     ].
@@ -1489,7 +1493,7 @@
     ^ self image
 
     "Modified: / 17-09-1995 / 18:48:46 / claus"
-    "Modified: / 22-02-2017 / 18:03:10 / cg"
+    "Modified: / 23-02-2017 / 01:21:35 / cg"
 !
 
 fromWindowsICOFile:aFilename