--- a/WindowsIconReader.st Sat Sep 12 15:40:19 1998 +0200
+++ b/WindowsIconReader.st Fri Sep 18 16:00:55 1998 +0200
@@ -402,7 +402,7 @@
| fileSize header iSize inDepth inPlanes compression
imgSize resH resV numColor numImportantColor
- dataStart
+ dataStart t
rawMap rMap gMap bMap srcIndex
bytesPerRow fourBytesPerColorInfo|
@@ -416,7 +416,6 @@
aStream nextBytes:18 into:header.
iSize := header at:(16r0E + 1).
-
(iSize == 40) ifTrue:[ "header-size"
"
its an Windows3.x BMP file
@@ -547,6 +546,13 @@
photometric := #rgb.
samplesPerPixel := 3.
bitsPerSample := #(8 8 8).
+ "/ stupid must swap red & blue bytes
+
+ 1 to:data size by:3 do:[:i |
+ t := data at:i.
+ data at:i put:(data at:i+2).
+ data at:i+2 put:t
+ ].
^ self
].
inDepth == 1 ifTrue:[
@@ -565,7 +571,7 @@
colorMap := Colormap redVector:rMap greenVector:gMap blueVector:bMap.
"Modified: / 17.9.1995 / 18:48:46 / claus"
- "Modified: / 29.5.1998 / 18:38:32 / cg"
+ "Modified: / 16.9.1998 / 01:09:08 / cg"
!
fromWindowsICOFile:aFilename
@@ -806,6 +812,6 @@
!WindowsIconReader class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/WindowsIconReader.st,v 1.41 1998-05-29 16:38:41 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/WindowsIconReader.st,v 1.42 1998-09-18 14:00:55 cg Exp $'
! !
WindowsIconReader initialize!