Squeak Class Documentation category index | class index  
 
GIFReadWriter
  category: Graphics-Files
  superclass: ImageReadWriter
  subclasses:

Copyright (c) Kazuki Yasumatsu, 1995. All rights reserved.

Used with permission. Modified for use in Squeak.

instance methods
  accessing
  nextImage
nextPutImage:
setStream:
understandsImageFormat

  private
  checkCodeSize
setParameters:
updatePixelPosition

  private-bits access
  flushBits
nextBits
nextBitsPut:

  private-decoding
  readBitData
readBody
readCode
readColorTable:
readHeader
readWord
skipBitData

  private-encoding
  flushCode
readPixelFrom:
writeBitData:
writeCode:
writeCodeAndCheckCodeSize:
writeHeader
writeWord:

  private-packing
  fillBuffer
flushBuffer
nextByte
nextBytePut:
peekByte

class methods
  class initialization
  initialize

instance methods
  accessing top  
 

nextImage

Read in the next GIF image from the stream. Read it all into
memory first for speed.


 

nextPutImage:

Encoding anImage on stream.


 

setStream:

Feed it in from an existing source


 

understandsImageFormat

Test to see if the image stream format is understood by this decoder.
This should be implemented in each subclass of ImageReadWriter so that
a proper decoder can be selected without ImageReadWriter having to know
about all possible image file types.


  private top  
 

checkCodeSize


 

setParameters:


 

updatePixelPosition


  private-bits access top  
 

flushBits


 

nextBits


 

nextBitsPut:


  private-decoding top  
 

readBitData

using modified Lempel-Ziv Welch algorithm.


 

readBody

Read the GIF blocks. Modified to return a form.


 

readCode


 

readColorTable:


 

readHeader


 

readWord


 

skipBitData


  private-encoding top  
 

flushCode


 

readPixelFrom:

Since bits is a Bitmap with 32 bit values, watch out for the
padding at the end of each row. But, GIF format already wants padding to
32 bit boundary! OK as is. tk 9/14/97


 

writeBitData:

using modified Lempel-Ziv Welch algorithm.


 

writeCode:


 

writeCodeAndCheckCodeSize:


 

writeHeader


 

writeWord:


  private-packing top  
 

fillBuffer


 

flushBuffer


 

nextByte


 

nextBytePut:


 

peekByte


class methods
  class initialization top  
 

initialize

GIFReadWriter initialize