--- a/WinIconRdr.st Mon Jan 27 11:45:45 1997 +0100
+++ b/WinIconRdr.st Tue Jan 28 01:48:47 1997 +0100
@@ -119,28 +119,28 @@
d == 8 ifTrue:[
(self class loadBMP8Width:w height:h compression:c from:aStream into:data) ifFalse:[
- 'BMP: read/decompression failed' infoPrintNL.
+ 'WinIconReader [warning]: read/decompression failed' infoPrintNL.
^ false
].
^ true
].
d == 4 ifTrue:[
(self class loadBMP4to8Width:w height:h compression:c from:aStream into:data) ifFalse:[
- 'BMP: read/decompression failed' infoPrintNL.
+ 'WinIconReader [warning]: read/decompression failed' infoPrintNL.
^ false
].
^ true
].
d == 2 ifTrue:[
(self class loadBMP2to8Width:w height:h from:aStream into:data) ifFalse:[
- 'BMP: read failed' infoPrintNL.
+ 'WinIconReader [warning]: read failed' infoPrintNL.
^ false
].
^ true
].
d == 1 ifTrue:[
(self class loadBMP1to8Width:w height:h from:aStream into:data) ifFalse:[
- 'BMP: read failed' infoPrintNL.
+ 'WinIconReader [warning]: read failed' infoPrintNL.
^ false
].
^ true
@@ -148,7 +148,7 @@
d == 24 ifTrue:[
bytesPerRow := w * 3.
((aStream nextBytes:(h * bytesPerRow) into:data) ~~ (h * bytesPerRow)) ifTrue:[
- 'BMP: read failed' infoPrintNL.
+ 'WinIconReader [warning]: read failed' infoPrintNL.
^ false
].
"/ stupid - last row comes first
@@ -165,10 +165,10 @@
].
^ true
].
- 'BMP: unsupported depth:' infoPrint. d infoPrintNL.
+ 'WinIconReader [warning]: unsupported depth:' infoPrint. d infoPrintNL.
"Created: 17.9.1995 / 18:48:11 / claus"
- "Modified: 23.4.1996 / 13:09:09 / cg"
+ "Modified: 28.1.1997 / 01:46:07 / cg"
! !
!WindowsIconReader methodsFor:'reading from file'!
@@ -310,7 +310,7 @@
fileSize := aStream size.
fileSize < 16 ifTrue:[
- 'WINREADER: short file' infoPrintNL.
+ 'WinIconReader [warning]: short file' infoPrintNL.
^ nil
].
@@ -319,37 +319,37 @@
(header startsWith:#(66 77)) ifTrue:[ "BM"
aStream position:1.
- 'WINREADER: Win3.x or OS/2 vsn 2 BM format' infoPrintNL.
+"/ 'WinIconReader [info]: Win3.x or OS/2 vsn 2 BM format' infoPrintNL.
^ self fromWindowsBMPStream:aStream
].
(header startsWith:#(66 65)) ifTrue:[ "BA"
aStream position:1.
- 'WINREADER: OS/2 vsn 2 BA format' infoPrintNL.
+"/ 'WinIconReader [info]: OS/2 vsn 2 BA format' infoPrintNL.
^ self fromOS2Stream:aStream
].
(header startsWith:#(73 67)) ifTrue:[ "IC"
aStream position:1.
- 'WINREADER: OS/2 IC format' infoPrintNL.
+"/ 'WinIconReader [info]: OS/2 IC format' infoPrintNL.
^ self fromOS2Stream:aStream
].
(header startsWith:#(80 84)) ifTrue:[ "PT"
aStream position:1.
- 'WINREADER: OS/2 PT format' infoPrintNL.
+"/ 'WinIconReader [info]: OS/2 PT format' infoPrintNL.
^ self fromOS2Stream:aStream
].
(header startsWith:#(16r53 16r5A)) ifTrue:[ "SZ"
- 'WINREADER: SZ format not supported:' infoPrintNL.
+ 'WinIconReader [warning]: SZ format not supported:' infoPrintNL.
^ nil.
aStream position:1.
- 'WINREADER: OS/2 PT format' infoPrintNL.
+ 'WinIconReader [info]: OS/2 PT format' infoPrintNL.
^ self fromOS2Stream:aStream
].
(header startsWith:#(0 0 1 0)) ifTrue:[
aStream position:1.
- 'WINREADER: Win3.x ICO format' infoPrintNL.
+"/ 'WinIconReader [info]: Win3.x ICO format' infoPrintNL.
^ self fromWindowsICOStream:aStream
].
- 'WINREADER: format not supported:' infoPrint.
+ 'WinIconReader [warning]: format not supported:' infoPrint.
((header at:1) printStringRadix:16) infoPrint.
' ' infoPrint.
((header at:2) printStringRadix:16) infoPrintNL.
@@ -360,7 +360,7 @@
"
"Modified: 17.9.1995 / 18:59:07 / claus"
- "Modified: 23.4.1996 / 13:11:10 / cg"
+ "Modified: 28.1.1997 / 01:48:31 / cg"
!
fromWindowsBMPFile: aFilename
@@ -401,7 +401,7 @@
its an Windows3.x BMP file
or OS/2 vsn 2 BMP file
"
- 'BMP: Win3.x or OS/2 vsn 2 format' infoPrintNL.
+"/ 'WinIconReader [info]: Win3.x or OS/2 vsn 2 format' infoPrintNL.
aStream nextBytes:(40-4) into:header startingAt:19.
@@ -422,7 +422,7 @@
"
inDepth <= 8 ifTrue:[
numColor := 1 bitShift:inDepth.
- 'BMP: missing nColor in header - assume ' infoPrint. numColor infoPrintNL
+ 'WinIconReader [warning]: missing nColor in header - assume ' infoPrint. numColor infoPrintNL
]
].
@@ -437,7 +437,7 @@
"
its an OS/2 (vsn1.2) BMP file
"
- 'BMP: OS/2 vsn 1.2 format' infoPrintNL.
+"/ 'WinIconReader [info]: OS/2 vsn 1.2 format' infoPrintNL.
aStream nextBytes:(12-4) into:header startingAt:19.
width := header wordAt:(16r12 + 1) MSB:false. "(header at:19) + ((header at:20) * 256). "
@@ -451,7 +451,7 @@
compression := 0.
dataStart := header wordAt:(16r0A + 1) MSB:false
] ifFalse:[
- 'BMP: unknown format' infoPrintNL.
+ 'WinIconReader [warning]: unknown format' infoPrintNL.
^ nil
].
].
@@ -483,21 +483,21 @@
compression == 1 ifTrue:[
"/ RLE8 - must be depth-8
inDepth ~~ 8 ifTrue:[
- 'BMP: RLE8 compression only allowed with depth8 images' infoPrintNL.
+ 'WinIconReader [warning]: RLE8 compression only allowed with depth8 images' infoPrintNL.
^ nil
].
].
compression == 2 ifTrue:[
"/ RLE4 - must be depth-4
inDepth ~~ 4 ifTrue:[
- 'BMP: RLE4 compression only allowed with depth4 images' infoPrintNL.
+ 'WinIconReader [warning]: RLE4 compression only allowed with depth4 images' infoPrintNL.
^ nil
].
].
].
inPlanes ~~ 1 ifTrue:[
- 'BMP: only 1 plane images supported' infoPrintNL.
+ 'WinIconReader [warning]: only 1 plane images supported' infoPrintNL.
^ nil
].
@@ -529,7 +529,7 @@
colorMap := Colormap redVector:rMap greenVector:gMap blueVector:bMap.
"Modified: 17.9.1995 / 18:48:46 / claus"
- "Modified: 23.4.1996 / 13:10:00 / cg"
+ "Modified: 28.1.1997 / 01:47:18 / cg"
!
fromWindowsICOFile:aFilename
@@ -647,6 +647,6 @@
!WindowsIconReader class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/Attic/WinIconRdr.st,v 1.26 1996-06-07 13:48:46 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/Attic/WinIconRdr.st,v 1.27 1997-01-28 00:48:47 cg Exp $'
! !
WindowsIconReader initialize!