sorry: only depth4 images are handled.
authorClaus Gittinger <cg@exept.de>
Tue, 18 May 1999 21:17:09 +0200
changeset 1171 d848c46349ab
parent 1170 1d034c7d7601
child 1172 a03cba74d9d2
sorry: only depth4 images are handled.
WinIconRdr.st
WindowsIconReader.st
--- a/WinIconRdr.st	Tue May 18 14:13:34 1999 +0200
+++ b/WinIconRdr.st	Tue May 18 21:17:09 1999 +0200
@@ -619,6 +619,10 @@
     "23, ... , 62         ?"
 
     inDepth := header at:16r25.
+    inDepth ~~ 4 ifTrue:[
+        "/ can only handle depth4 images - for now.
+        ^ self fileFormatError:'only depth 4 ico-images supported'.
+    ].
 
     "read the colormap"
 
@@ -689,7 +693,7 @@
      WindowsIconReader new fromWindowsICOFile:'/phys/clam2//LocalLibrary/Images/WIN_icons/ibm.ico'.
     "
 
-    "Modified: 24.4.1997 / 22:03:48 / cg"
+    "Modified: / 18.5.1999 / 15:40:00 / cg"
 ! !
 
 !WindowsIconReader methodsFor:'writing to file'!
@@ -929,6 +933,6 @@
 !WindowsIconReader class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/Attic/WinIconRdr.st,v 1.44 1999-05-09 16:19:42 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/Attic/WinIconRdr.st,v 1.45 1999-05-18 19:17:09 cg Exp $'
 ! !
 WindowsIconReader initialize!
--- a/WindowsIconReader.st	Tue May 18 14:13:34 1999 +0200
+++ b/WindowsIconReader.st	Tue May 18 21:17:09 1999 +0200
@@ -619,6 +619,10 @@
     "23, ... , 62         ?"
 
     inDepth := header at:16r25.
+    inDepth ~~ 4 ifTrue:[
+        "/ can only handle depth4 images - for now.
+        ^ self fileFormatError:'only depth 4 ico-images supported'.
+    ].
 
     "read the colormap"
 
@@ -689,7 +693,7 @@
      WindowsIconReader new fromWindowsICOFile:'/phys/clam2//LocalLibrary/Images/WIN_icons/ibm.ico'.
     "
 
-    "Modified: 24.4.1997 / 22:03:48 / cg"
+    "Modified: / 18.5.1999 / 15:40:00 / cg"
 ! !
 
 !WindowsIconReader methodsFor:'writing to file'!
@@ -929,6 +933,6 @@
 !WindowsIconReader class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/WindowsIconReader.st,v 1.44 1999-05-09 16:19:42 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/WindowsIconReader.st,v 1.45 1999-05-18 19:17:09 cg Exp $'
 ! !
 WindowsIconReader initialize!