--- a/GIFReader.st Wed Feb 11 12:43:05 2009 +0100
+++ b/GIFReader.st Wed Feb 11 17:16:43 2009 +0100
@@ -9,7 +9,6 @@
other person. No title to or ownership of the software is
hereby transferred.
"
-
"{ Package: 'stx:libview2' }"
ImageReader subclass:#GIFReader
@@ -123,20 +122,7 @@
"Modified: 10.1.1997 / 15:40:34 / cg"
! !
-!GIFReader methodsFor:'private-reading'!
-
-makeGreyscale
- "not yet implemented/needed"
-!
-
-readColorMap:colorMapSize
- "get a gif colormap consisting of colorMapSize entries"
-
- |rgbVector|
-
- rgbVector := inStream nextBytes:colorMapSize*3.
- ^ MappedPalette rgbBytesVector:rgbVector
-!
+!GIFReader methodsFor:'AEG-Changes'!
readExtension:aStream
"get gif89 extension"
@@ -195,13 +181,14 @@
"/
"/ 'GIFREADER [info]: graphic control extension' infoPrintCR.
- [(subBlockSize := aStream nextByte) ~~ 0] whileTrue:[
+ [(subBlockSize := aStream nextByte) ~~ 0 and:[subBlockSize notNil]] whileTrue:[
"/ type bitAnd:1 means: animationMask is transparent pixel
"/ to be implemented in Image ...
animationType := aStream nextByte.
animationTime := aStream nextShortMSB:false.
animationMask := aStream nextByte.
+
subBlockSize := subBlockSize - 4.
(animationType bitTest: 1) ifTrue:[
@@ -287,6 +274,21 @@
]
"Modified: / 1.4.1998 / 15:01:18 / cg"
+! !
+
+!GIFReader methodsFor:'private-reading'!
+
+makeGreyscale
+ "not yet implemented/needed"
+!
+
+readColorMap:colorMapSize
+ "get a gif colormap consisting of colorMapSize entries"
+
+ |rgbVector|
+
+ rgbVector := inStream nextBytes:colorMapSize*3.
+ ^ MappedPalette rgbBytesVector:rgbVector
!
readImage:aStream
@@ -981,7 +983,7 @@
!GIFReader class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/GIFReader.st,v 1.93 2005-08-05 12:45:04 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/GIFReader.st,v 1.94 2009-02-11 16:16:43 cg Exp $'
! !
GIFReader initialize!