Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- MOD File Format - <b>gif extension blocks</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 GIF Extension Blocks

 To provide for orderly extension of the GIF definition, a mechanism for
 defining  the  packaging  of extensions within a GIF data stream is
 necessary.  Specific GIF extensions are to be defined and documented  by
 CompuServe in order to provide a controlled enhancement path.

 GIF Extension Blocks are packaged in a manner similar to that  used by the
 raster data though not compressed.  The basic structure is:

         7 6 5 4 3 2 1 0  Byte #
        +---------------+
        |0 0 1 0 0 0 0 1|  1       '!' - GIF Extension Block Introducer
        |---------------|
        | function code |  2       Extension function code (0 to 255)
        |---------------|    ---+
        |  byte count   |       |
        |---------------|       |
        |               |       |-- Repeated as many times as necessary
        |func data bytes|       |
        |               |       |
        |---------------|    ---+
        |               |
        |---------------|
        |0 0 0 0 0 0 0 0|       zero byte count (terminates block)
        +---------------+

 A GIF Extension Block may immediately preceed any Image Descriptor or
 occur before the GIF Terminator.

 All GIF decoders must be able to recognize  the  existence  of  GIF
 Extension  Blocks  and  read past them if unable to process the function
 code.  This ensures that older decoders will be able to process extended
 GIF   image   files   in  the  future,  though  without  the  additional
 functionality.

See Also: Image Descriptor GIF Terminator

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson