author | Claus Gittinger <cg@exept.de> |
Thu, 06 Mar 1997 01:32:24 +0100 | |
changeset 493 | d6392d88c552 |
parent 398 | aef700d15416 |
child 519 | 1ee56341ef50 |
permissions | -rw-r--r-- |
0 | 1 |
" |
6 | 2 |
COPYRIGHT (c) 1991 by Claus Gittinger |
26 | 3 |
All Rights Reserved |
0 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
ImageReader subclass:#GIFReader |
|
307
9eaeaca798a5
create a mask-image, if present
Claus Gittinger <cg@exept.de>
parents:
305
diff
changeset
|
14 |
instanceVariableNames:'redMap greenMap blueMap maskPixelValue' |
154 | 15 |
classVariableNames:'' |
16 |
poolDictionaries:'' |
|
259 | 17 |
category:'Graphics-Images-Support' |
0 | 18 |
! |
19 |
||
339 | 20 |
!GIFReader class methodsFor:'documentation'! |
0 | 21 |
|
21 | 22 |
copyright |
23 |
" |
|
24 |
COPYRIGHT (c) 1991 by Claus Gittinger |
|
26 | 25 |
All Rights Reserved |
21 | 26 |
|
27 |
This software is furnished under a license and may be used |
|
28 |
only in accordance with the terms of that license and with the |
|
29 |
inclusion of the above copyright notice. This software may not |
|
30 |
be provided or otherwise made available to, or used by, any |
|
31 |
other person. No title to or ownership of the software is |
|
32 |
hereby transferred. |
|
33 |
" |
|
34 |
! |
|
35 |
||
0 | 36 |
documentation |
37 |
" |
|
38 |
this class provides methods for loading and saving GIF pictures. |
|
21 | 39 |
It has been tested with some different GIF87a pictures, I dont |
0 | 40 |
know, if it works with other GIF versions. |
41 |
GIF extension blocks are not handled. |
|
42 |
||
43 |
GIF file writing is not implemented (use TIFF). |
|
44 |
||
21 | 45 |
legal stuff extracted from GIF87a documentation: |
0 | 46 |
|
47 |
CompuServe Incorporated hereby grants a limited, non-exclusive, royalty-free |
|
48 |
license for the use of the Graphics Interchange Format(sm) in computer |
|
49 |
software; computer software utilizing GIF(sm) must acknowledge ownership of the |
|
50 |
Graphics Interchange Format and its Service Mark by CompuServe Incorporated, in |
|
51 |
User and Technical Documentation. |
|
52 |
||
53 |
The Graphics Interchange Format(c) is the Copyright property of |
|
54 |
CompuServe Incorporated. GIF(sm) is a Service Mark property of |
|
55 |
CompuServe Incorporated. |
|
194 | 56 |
|
57 |
[See also:] |
|
234 | 58 |
Image Form Icon |
194 | 59 |
BlitImageReader FaceReader JPEGReader PBMReader PCXReader |
210 | 60 |
ST80FormReader SunRasterReader TargaReader TIFFReader WindowsIconReader |
209 | 61 |
XBMReader XPMReader XWDReader |
220 | 62 |
|
63 |
[author:] |
|
64 |
Claus Gittinger |
|
0 | 65 |
" |
66 |
! ! |
|
67 |
||
339 | 68 |
!GIFReader class methodsFor:'initialization'! |
26 | 69 |
|
70 |
initialize |
|
198 | 71 |
"install myself in the Image classes fileFormat table |
398 | 72 |
for the `.gif' extensions." |
198 | 73 |
|
398 | 74 |
Image addReader:self suffix:'gif'. |
198 | 75 |
|
398 | 76 |
"Modified: 1.2.1997 / 14:59:37 / cg" |
26 | 77 |
! ! |
78 |
||
339 | 79 |
!GIFReader class methodsFor:'testing'! |
1 | 80 |
|
81 |
isValidImageFile:aFileName |
|
82 |
"return true, if aFileName contains a GIF image" |
|
83 |
||
84 |
|id inStream| |
|
85 |
||
9 | 86 |
inStream := self streamReadingFile:aFileName. |
1 | 87 |
inStream isNil ifTrue:[^ false]. |
88 |
||
332 | 89 |
inStream text. |
90 |
||
1 | 91 |
id := String new:6. |
92 |
inStream nextBytes:6 into:id. |
|
93 |
inStream close. |
|
94 |
||
95 |
(id = 'GIF87a') ifFalse:[ |
|
174 | 96 |
(id startsWith:'GIF') ifFalse:[^ false]. |
1 | 97 |
|
174 | 98 |
id ~= 'GIF89a' ifTrue:[ |
355 | 99 |
'GIFReader [info]: not a GIF87a/GIF89a file - hope that works' infoPrintCR. |
174 | 100 |
] |
1 | 101 |
]. |
102 |
^ true |
|
174 | 103 |
|
355 | 104 |
"Modified: 10.1.1997 / 15:40:34 / cg" |
1 | 105 |
! ! |
106 |
||
0 | 107 |
!GIFReader methodsFor:'reading from file'! |
108 |
||
1 | 109 |
checkGreyscaleColormap |
239 | 110 |
"return true, if colormap is actually a greymap. |
111 |
Could be used to convert it into a greyScale image - which is not yet done." |
|
1 | 112 |
|
20 | 113 |
|sz "{ Class: SmallInteger }" |
114 |
redVal| |
|
115 |
||
116 |
sz := redMap size. |
|
117 |
||
118 |
1 to:sz do:[:i | |
|
239 | 119 |
redVal := redMap at:i. |
120 |
redVal ~~ (greenMap at:i) ifTrue:[^ false]. |
|
121 |
redVal ~~ (blueMap at:i) ifTrue:[^ false]. |
|
1 | 122 |
]. |
123 |
^ true |
|
239 | 124 |
|
125 |
"Modified: 2.5.1996 / 17:54:40 / cg" |
|
1 | 126 |
! |
127 |
||
43 | 128 |
fromStream:aStream |
192 | 129 |
"read a stream containing a GIF image. |
130 |
Leave image description in instance variables." |
|
43 | 131 |
|
132 |
|byte index flag count |
|
133 |
colorMapSize bitsPerPixel scrWidth scrHeight |
|
134 |
hasColorMap hasLocalColorMap interlaced id |
|
135 |
leftOffs topOffs codeLen |
|
136 |
compressedData compressedSize |
|
307
9eaeaca798a5
create a mask-image, if present
Claus Gittinger <cg@exept.de>
parents:
305
diff
changeset
|
137 |
tmp srcOffset dstOffset isGif89 |
64 | 138 |
h "{ Class: SmallInteger }"| |
43 | 139 |
|
140 |
inStream := aStream. |
|
141 |
aStream binary. |
|
142 |
||
143 |
"GIF-files are always lsb (intel-world)" |
|
144 |
byteOrder := #lsb. |
|
145 |
||
331
304f9c439efa
allow reading from ByteArray-readStreams
Claus Gittinger <cg@exept.de>
parents:
315
diff
changeset
|
146 |
id := ByteArray new:6. |
304f9c439efa
allow reading from ByteArray-readStreams
Claus Gittinger <cg@exept.de>
parents:
315
diff
changeset
|
147 |
aStream nextBytes:6 into:id startingAt:1. |
304f9c439efa
allow reading from ByteArray-readStreams
Claus Gittinger <cg@exept.de>
parents:
315
diff
changeset
|
148 |
id := id asString. |
43 | 149 |
|
150 |
"all I had for testing where GIF87a files; |
|
151 |
I hope later versions work too ..." |
|
152 |
||
154 | 153 |
isGif89 := false. |
43 | 154 |
(id ~= 'GIF87a') ifTrue:[ |
154 | 155 |
(id startsWith:'GIF') ifFalse:[ |
355 | 156 |
'GIFReader [info]: not a gif file' infoPrintCR. |
154 | 157 |
^ nil |
158 |
]. |
|
159 |
id ~= 'GIF89a' ifTrue:[ |
|
355 | 160 |
'GIFReader [info]: not a GIF87a/GIF89a file - hope that works' infoPrintCR. |
154 | 161 |
] |
43 | 162 |
]. |
163 |
||
164 |
"get screen dimensions (not used)" |
|
165 |
||
166 |
scrWidth := aStream nextShortMSB:false. |
|
167 |
scrHeight := aStream nextShortMSB:false. |
|
168 |
||
169 |
"get flag byte" |
|
170 |
flag := aStream nextByte. |
|
171 |
hasColorMap := (flag bitAnd:2r10000000) ~~ 0. |
|
172 |
"bitsPerRGB := ((flag bitAnd:2r01110000) bitShift:-4) + 1. " |
|
173 |
"colorMapSorted := ((flag bitAnd:2r00001000) ~~ 0. " |
|
174 |
bitsPerPixel := (flag bitAnd:2r00000111) + 1. |
|
175 |
colorMapSize := 1 bitShift:bitsPerPixel. |
|
176 |
||
177 |
"get background (not used)" |
|
178 |
aStream nextByte. |
|
179 |
||
180 |
"aspect ratio (not used)" |
|
181 |
aStream nextByte. |
|
182 |
||
183 |
"get colorMap" |
|
184 |
hasColorMap ifTrue:[ |
|
154 | 185 |
self readColorMap:colorMapSize |
43 | 186 |
]. |
187 |
||
154 | 188 |
"skip gif89a extensions " |
43 | 189 |
byte := aStream nextByte. |
154 | 190 |
[byte == 16r21] whileTrue:[ |
191 |
"/ extension |
|
192 |
self readExtension:aStream. |
|
193 |
byte := aStream nextByte. |
|
194 |
]. |
|
195 |
||
196 |
"must now be image separator" |
|
43 | 197 |
(byte ~~ 16r2C) ifTrue:[ |
355 | 198 |
('GIFReader [info]: corrupted gif file (no IMAGESEP): ' , (byte printStringRadix:16)) infoPrintCR. |
154 | 199 |
^ nil |
43 | 200 |
]. |
201 |
||
202 |
"get image data" |
|
203 |
leftOffs := aStream nextShortMSB:false. |
|
204 |
topOffs := aStream nextShortMSB:false. |
|
205 |
width := aStream nextShortMSB:false. |
|
206 |
height := aStream nextShortMSB:false. |
|
207 |
||
334 | 208 |
dimensionCallBack notNil ifTrue:[ |
209 |
dimensionCallBack value:self |
|
210 |
]. |
|
211 |
||
43 | 212 |
" |
213 |
'width ' print. width printNewline. |
|
214 |
'height ' print. height printNewline. |
|
215 |
" |
|
216 |
||
217 |
"another flag byte" |
|
218 |
flag := aStream nextByte. |
|
219 |
interlaced := (flag bitAnd:2r01000000) ~~ 0. |
|
220 |
hasLocalColorMap := (flag bitAnd:2r10000000) ~~ 0. |
|
221 |
"localColorMapSorted := (flag bitAnd:2r00100000) ~~ 0. " |
|
222 |
||
223 |
"if image has a local colormap, this one is used" |
|
224 |
||
225 |
hasLocalColorMap ifTrue:[ |
|
154 | 226 |
"local descr. overwrites" |
227 |
bitsPerPixel := (flag bitAnd:2r00000111) + 1. |
|
228 |
colorMapSize := 1 bitShift:bitsPerPixel. |
|
43 | 229 |
" 'local colormap' printNewline. " |
154 | 230 |
"overwrite colormap" |
231 |
self readColorMap:colorMapSize |
|
43 | 232 |
]. |
233 |
||
234 |
"get codelen for decompression" |
|
235 |
codeLen := aStream nextByte. |
|
236 |
||
237 |
compressedData := ByteArray uninitializedNew:(aStream size). |
|
238 |
||
239 |
"get compressed data" |
|
240 |
index := 1. |
|
241 |
count := aStream nextByte. |
|
242 |
[count notNil and:[count ~~ 0]] whileTrue:[ |
|
154 | 243 |
aStream nextBytes:count into:compressedData startingAt:index. |
244 |
index := index + count. |
|
245 |
count := aStream nextByte |
|
43 | 246 |
]. |
247 |
compressedSize := index - 1. |
|
248 |
||
64 | 249 |
h := height. |
250 |
data := ByteArray new:((width + 1) * (h + 1)). |
|
271 | 251 |
"/ 'GIFReader: decompressing ...' infoPrintCR. |
43 | 252 |
|
253 |
self class decompressGIFFrom:compressedData |
|
154 | 254 |
count:compressedSize |
255 |
into:data |
|
256 |
startingAt:1 |
|
257 |
codeLen:(codeLen + 1). |
|
43 | 258 |
|
259 |
interlaced ifTrue:[ |
|
339 | 260 |
"/ 'GIFREADER: deinterlacing ...' infoPrintCR. |
154 | 261 |
tmp := ByteArray new:(data size). |
43 | 262 |
|
154 | 263 |
"phase 1: 0, 8, 16, 24, ..." |
43 | 264 |
|
154 | 265 |
srcOffset := 1. |
266 |
0 to:(h - 1) by:8 do:[:dstRow | |
|
267 |
dstOffset := dstRow * width + 1. |
|
268 |
tmp replaceFrom:dstOffset to:(dstOffset + width - 1) |
|
269 |
with:data startingAt:srcOffset. |
|
270 |
srcOffset := srcOffset + width. |
|
271 |
]. |
|
43 | 272 |
|
154 | 273 |
"phase 2: 4, 12, 20, 28, ..." |
43 | 274 |
|
154 | 275 |
4 to:(h - 1) by:8 do:[:dstRow | |
276 |
dstOffset := dstRow * width + 1. |
|
277 |
tmp replaceFrom:dstOffset to:(dstOffset + width - 1) |
|
278 |
with:data startingAt:srcOffset. |
|
279 |
srcOffset := srcOffset + width. |
|
280 |
]. |
|
43 | 281 |
|
154 | 282 |
"phase 3: 2, 6, 10, 14, ..." |
43 | 283 |
|
154 | 284 |
2 to:(h - 1) by:4 do:[:dstRow | |
285 |
dstOffset := dstRow * width + 1. |
|
286 |
tmp replaceFrom:dstOffset to:(dstOffset + width - 1) |
|
287 |
with:data startingAt:srcOffset. |
|
288 |
srcOffset := srcOffset + width. |
|
289 |
]. |
|
43 | 290 |
|
154 | 291 |
"phase 4: 1, 3, 5, 7, ..." |
43 | 292 |
|
154 | 293 |
1 to:(h - 1) by:2 do:[:dstRow | |
294 |
dstOffset := dstRow * width + 1. |
|
295 |
tmp replaceFrom:dstOffset to:(dstOffset + width - 1) |
|
296 |
with:data startingAt:srcOffset. |
|
297 |
srcOffset := srcOffset + width. |
|
298 |
]. |
|
43 | 299 |
|
154 | 300 |
data := tmp. |
301 |
tmp := nil |
|
43 | 302 |
]. |
303 |
||
304 |
photometric := #palette. |
|
305 |
samplesPerPixel := 1. |
|
306 |
bitsPerSample := #(8). |
|
307 |
||
308 |
"check if only grey values are used, |
|
309 |
could make it a greyscale image if so (currently not done)" |
|
310 |
||
83 | 311 |
"/ self checkGreyscaleColormap ifTrue:[ |
312 |
"/ self makeGreyscale |
|
313 |
"/ ]. |
|
314 |
||
239 | 315 |
colorMap := Colormap |
316 |
redVector:redMap |
|
317 |
greenVector:greenMap |
|
318 |
blueVector:blueMap. |
|
43 | 319 |
|
307
9eaeaca798a5
create a mask-image, if present
Claus Gittinger <cg@exept.de>
parents:
305
diff
changeset
|
320 |
maskPixelValue notNil ifTrue:[ |
9eaeaca798a5
create a mask-image, if present
Claus Gittinger <cg@exept.de>
parents:
305
diff
changeset
|
321 |
"/ |
9eaeaca798a5
create a mask-image, if present
Claus Gittinger <cg@exept.de>
parents:
305
diff
changeset
|
322 |
"/ ok, there is a maskValue |
9eaeaca798a5
create a mask-image, if present
Claus Gittinger <cg@exept.de>
parents:
305
diff
changeset
|
323 |
"/ build a Depth1Image for it. |
9eaeaca798a5
create a mask-image, if present
Claus Gittinger <cg@exept.de>
parents:
305
diff
changeset
|
324 |
"/ |
315
506e0ce38534
Moved #buildMask from GIFReader to ImageReader>>#buildMaskFromColor:
Stefan Vogel <sv@exept.de>
parents:
312
diff
changeset
|
325 |
self buildMaskFromColor:maskPixelValue |
307
9eaeaca798a5
create a mask-image, if present
Claus Gittinger <cg@exept.de>
parents:
305
diff
changeset
|
326 |
]. |
9eaeaca798a5
create a mask-image, if present
Claus Gittinger <cg@exept.de>
parents:
305
diff
changeset
|
327 |
|
43 | 328 |
" |
329 |
GIFReader fromFile:'../fileIn/bitmaps/claus.gif |
|
330 |
GIFReader fromFile:'../fileIn/bitmaps/garfield.gif' |
|
331 |
" |
|
154 | 332 |
|
315
506e0ce38534
Moved #buildMask from GIFReader to ImageReader>>#buildMaskFromColor:
Stefan Vogel <sv@exept.de>
parents:
312
diff
changeset
|
333 |
"Modified: 5.7.1996 / 17:32:01 / stefan" |
355 | 334 |
"Modified: 10.1.1997 / 15:40:58 / cg" |
135 | 335 |
! |
336 |
||
337 |
makeGreyscale |
|
338 |
"not yet implemented/needed" |
|
339 |
! |
|
340 |
||
341 |
readColorMap:colorMapSize |
|
342 |
"get gif colormap consisting of colorMapSize entries" |
|
343 |
||
344 |
|sz "{ Class: SmallInteger }"| |
|
345 |
||
346 |
redMap := ByteArray uninitializedNew:colorMapSize. |
|
347 |
greenMap := ByteArray uninitializedNew:colorMapSize. |
|
348 |
blueMap := ByteArray uninitializedNew:colorMapSize. |
|
239 | 349 |
|
135 | 350 |
sz := colorMapSize. |
351 |
1 to:sz do:[:i | |
|
239 | 352 |
redMap at:i put:(inStream nextByte). |
353 |
greenMap at:i put:(inStream nextByte). |
|
354 |
blueMap at:i put:(inStream nextByte) |
|
307
9eaeaca798a5
create a mask-image, if present
Claus Gittinger <cg@exept.de>
parents:
305
diff
changeset
|
355 |
]. |
239 | 356 |
|
307
9eaeaca798a5
create a mask-image, if present
Claus Gittinger <cg@exept.de>
parents:
305
diff
changeset
|
357 |
"Modified: 21.6.1996 / 12:32:43 / cg" |
154 | 358 |
! |
359 |
||
360 |
readExtension:aStream |
|
239 | 361 |
"get gif89 extension - this is currently ignored" |
154 | 362 |
|
363 |
|type blockSize subBlockSize |
|
304 | 364 |
aspNum aspDen left top width height cWidth cHeight fg bg |
365 |
animationType animationTime animationMask| |
|
154 | 366 |
|
367 |
type := aStream nextByte. |
|
368 |
type == $R asciiValue ifTrue:[ |
|
239 | 369 |
"/ |
154 | 370 |
"/ Ratio extension |
239 | 371 |
"/ |
354
b4d2ce853c24
stefans suggested info/warning/error/fatal
Claus Gittinger <cg@exept.de>
parents:
339
diff
changeset
|
372 |
'GIFREADER [info]: ratio extension ignored' infoPrintCR. |
154 | 373 |
blockSize := aStream nextByte. |
374 |
(blockSize == 2) ifTrue:[ |
|
375 |
aspNum := aStream nextByte. |
|
376 |
aspDen := aStream nextByte |
|
377 |
] ifFalse:[ |
|
378 |
aStream skip:blockSize |
|
379 |
]. |
|
380 |
"/ eat subblocks |
|
381 |
||
382 |
[(subBlockSize := aStream nextByte) > 0] whileTrue:[ |
|
383 |
aStream skip:subBlockSize |
|
239 | 384 |
]. |
385 |
^ self |
|
386 |
]. |
|
387 |
||
388 |
type == 16rFE ifTrue:[ |
|
389 |
"/ |
|
390 |
"/ comment extension |
|
391 |
"/ |
|
354
b4d2ce853c24
stefans suggested info/warning/error/fatal
Claus Gittinger <cg@exept.de>
parents:
339
diff
changeset
|
392 |
'GIFREADER [info]: comment extension ignored' infoPrintCR. |
239 | 393 |
[(blockSize := aStream nextByte) ~~ 0] whileTrue:[ |
394 |
aStream skip:blockSize |
|
395 |
]. |
|
396 |
^ self |
|
397 |
]. |
|
398 |
||
399 |
type == 16r01 ifTrue:[ |
|
400 |
"/ |
|
401 |
"/ plaintext extension |
|
402 |
"/ |
|
354
b4d2ce853c24
stefans suggested info/warning/error/fatal
Claus Gittinger <cg@exept.de>
parents:
339
diff
changeset
|
403 |
'GIFREADER [info]: plaintext extension ignored' infoPrintCR. |
239 | 404 |
subBlockSize := aStream nextByte. |
405 |
left := aStream nextShortMSB:false. |
|
406 |
top := aStream nextShortMSB:false. |
|
407 |
width := aStream nextShortMSB:false. |
|
408 |
height := aStream nextShortMSB:false. |
|
409 |
cWidth := aStream nextByte. |
|
410 |
cHeight := aStream nextByte. |
|
411 |
fg := aStream nextByte. |
|
412 |
bg := aStream nextByte. |
|
413 |
aStream skip:12. |
|
414 |
[(subBlockSize := aStream nextByte) > 0] whileTrue:[ |
|
415 |
aStream skip:subBlockSize |
|
416 |
]. |
|
417 |
^ self |
|
418 |
]. |
|
419 |
||
420 |
type == 16rF9 ifTrue:[ |
|
421 |
"/ |
|
422 |
"/ graphic control extension |
|
423 |
"/ |
|
354
b4d2ce853c24
stefans suggested info/warning/error/fatal
Claus Gittinger <cg@exept.de>
parents:
339
diff
changeset
|
424 |
"/ 'GIFREADER [info]: graphic control extension ignored' infoPrintCR. |
304 | 425 |
subBlockSize := aStream nextByte. |
305 | 426 |
|
427 |
"/ type=1 means: animationMask is transparent pixel |
|
428 |
"/ to be implemented in Image ... |
|
429 |
||
304 | 430 |
animationType := aStream nextByte. |
431 |
animationTime := aStream nextShortMSB:false. |
|
432 |
animationMask := aStream nextByte. |
|
307
9eaeaca798a5
create a mask-image, if present
Claus Gittinger <cg@exept.de>
parents:
305
diff
changeset
|
433 |
|
9eaeaca798a5
create a mask-image, if present
Claus Gittinger <cg@exept.de>
parents:
305
diff
changeset
|
434 |
animationType == 1 ifTrue:[ |
9eaeaca798a5
create a mask-image, if present
Claus Gittinger <cg@exept.de>
parents:
305
diff
changeset
|
435 |
maskPixelValue := animationMask. |
354
b4d2ce853c24
stefans suggested info/warning/error/fatal
Claus Gittinger <cg@exept.de>
parents:
339
diff
changeset
|
436 |
"/ 'GIFREADER [info]: mask: ' infoPrint. (maskPixelValue printStringRadix:16) infoPrintCR. |
307
9eaeaca798a5
create a mask-image, if present
Claus Gittinger <cg@exept.de>
parents:
305
diff
changeset
|
437 |
]. |
9eaeaca798a5
create a mask-image, if present
Claus Gittinger <cg@exept.de>
parents:
305
diff
changeset
|
438 |
|
9eaeaca798a5
create a mask-image, if present
Claus Gittinger <cg@exept.de>
parents:
305
diff
changeset
|
439 |
[(subBlockSize := aStream nextByte) > 0] whileTrue:[ |
239 | 440 |
aStream skip:subBlockSize |
441 |
]. |
|
442 |
^ self |
|
443 |
]. |
|
444 |
||
445 |
type == 16rFF ifTrue:[ |
|
446 |
"/ |
|
447 |
"/ application extension |
|
448 |
"/ |
|
354
b4d2ce853c24
stefans suggested info/warning/error/fatal
Claus Gittinger <cg@exept.de>
parents:
339
diff
changeset
|
449 |
'GIFREADER [info]: application extension ignored' infoPrintCR. |
239 | 450 |
[(subBlockSize := aStream nextByte) > 0] whileTrue:[ |
451 |
aStream skip:subBlockSize |
|
452 |
]. |
|
453 |
^ self |
|
454 |
]. |
|
455 |
||
456 |
"/ |
|
457 |
"/ unknown extension |
|
458 |
"/ |
|
354
b4d2ce853c24
stefans suggested info/warning/error/fatal
Claus Gittinger <cg@exept.de>
parents:
339
diff
changeset
|
459 |
'GIFREADER [info]: unknown extension ignored' infoPrintCR. |
239 | 460 |
[(subBlockSize := aStream nextByte) > 0] whileTrue:[ |
461 |
aStream skip:subBlockSize |
|
154 | 462 |
] |
463 |
||
354
b4d2ce853c24
stefans suggested info/warning/error/fatal
Claus Gittinger <cg@exept.de>
parents:
339
diff
changeset
|
464 |
"Modified: 10.1.1997 / 14:55:45 / cg" |
0 | 465 |
! ! |
43 | 466 |
|
339 | 467 |
!GIFReader class methodsFor:'documentation'! |
135 | 468 |
|
469 |
version |
|
398 | 470 |
^ '$Header: /cvs/stx/stx/libview2/GIFReader.st,v 1.46 1997-02-01 14:06:08 cg Exp $' |
135 | 471 |
! ! |
43 | 472 |
GIFReader initialize! |