#DOCUMENTATION by cg
class: WindowsIconReader
comment/format in:
#canRepresent:
#documentation
#fromWindowsICOFile:
--- a/WindowsIconReader.st Fri Feb 17 08:54:26 2017 +0100
+++ b/WindowsIconReader.st Fri Feb 17 08:56:12 2017 +0100
@@ -41,6 +41,7 @@
"
this class provides methods for loading Windows and OS2 icon and bmp files.
The name is misleading, but due to historic reasons.
+
The reader should support allmost all formats: Win2, Win3, Win4, Win5, WINCE and OS2.
(incl. PNG and JPG compression, and WINCE depth2 images)
@@ -262,13 +263,14 @@
canRepresent:anImage
"return true, if anImage can be represented in my file format.
- BMP supports depth 1,4,8 and 24."
+ BMP supports depth 1,4,8, 24 and 32."
(#(1 4 8 24 32) includes:anImage depth) ifTrue:[^true].
('WindwsIconReader [info]: image depth is not 1,4,8 or 24.') infoPrintCR.
^ false
- "Created: 17.10.1997 / 20:18:23 / cg"
+ "Created: / 17-10-1997 / 20:18:23 / cg"
+ "Modified (comment): / 17-02-2017 / 08:55:32 / cg"
!
isValidImageFile:aFileName
@@ -1472,6 +1474,7 @@
stream := self class streamReadingFile:aFilename.
stream isNil ifTrue:[^ nil].
+
reader := self class new.
reader fromWindowsICOStream:stream.
stream close.
@@ -1482,6 +1485,7 @@
"
"Modified: / 30-05-2007 / 16:57:52 / cg"
+ "Modified (format): / 17-02-2017 / 08:52:31 / cg"
!
fromWindowsICOStream:aStream