raise an error, if depth is not supported.
--- a/GIFReader.st Tue Oct 28 19:37:28 1997 +0100
+++ b/GIFReader.st Tue Oct 28 19:38:32 1997 +0100
@@ -703,6 +703,12 @@
save:image onFile:aFileName
"save image as GIF file on aFileName"
+ image depth ~~ 8 ifTrue:[
+ ^ Image cannotRepresentImageSignal
+ raiseWith:image
+ errorString:('GIF (currently) only supports depth8 images').
+ ].
+
outStream := FileStream newFileNamed:aFileName.
outStream isNil ifTrue:[
^ Image fileCreationErrorSignal
@@ -743,8 +749,8 @@
(Image fromFile:'./foo.gif') inspect
"
- "Created: 14.10.1997 / 17:40:12 / cg"
- "Modified: 14.10.1997 / 18:59:22 / cg"
+ "Created: / 14.10.1997 / 17:40:12 / cg"
+ "Modified: / 27.10.1997 / 22:42:31 / cg"
!
writeBitDataFor: image
@@ -916,6 +922,6 @@
!GIFReader class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/GIFReader.st,v 1.61 1997-10-22 15:19:46 ca Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/GIFReader.st,v 1.62 1997-10-28 18:38:32 cg Exp $'
! !
GIFReader initialize!