•  Back 
  •  %Main 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help page 
  •  Show info about hypertext 
  •  View a new file 
Topic       : ATARI ST Picture formats
Author      : David Baggett/Jan K⌐upka
Version     : atari_gf.hyp 0.01 (17/09/96)
Subject     : Documentation/File formats
Nodes       : 52
Index Size  : 1328
HCP-Version : 3
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : 
@help       : 
@options    : -i -s +y +z
@width      : 75Interchange File Format      *.IFF
4 bytes         "FORM" (FORM chunk ID)
1 longlong = 4 bytes
          length of file that follows
4 bytes         "ILBM" (InterLeaved BitMap file ID)

4 bytes         "BMHD" (BitMap HeaDer chunk ID)
1 longlong = 4 bytes
          length of chunk [20]
20 bytes        1 wordword = 2 bytes
 = image width in pixels
                1 wordword = 2 bytes
 = image height in lines
                1 wordword = 2 bytes
 = image x-offset [usually 0]
                1 wordword = 2 bytes
 = image y-offset [usually 0]
                1 byte = # bitplanes
                1 byte = mask (0=no, 1=impl., 2=transparent, 3=lasso)
                1 byte = compressed [1] or uncompressed [0]
                1 byte = unused [0]
                1 wordword = 2 bytes
 = transparent color (for mask=2)
                1 byte = x-aspect [5=640x200, 10=320x200/640x400,
                         20=320x400]
                1 byte = y-aspect [11]
                1 wordword = 2 bytes
 = page width (usually the same as image width)
                1 wordword = 2 bytes
 = page height (usually the same as image height)

4 bytes         "CMAP" (ColorMAP chunk ID)
1 longlong = 4 bytes
          length of chunk [3*n where n is the # colors]
3n bytes        3 bytes per RGB color.  Each color value is a byte
                and the actual color value is left-justified in the
                byte such that the most significant bit of the value
                is the MSB of the byte.  (ie. a color value of 15 ($0F)
                is stored as $F0)  The bytes are stored in R,G,B  order.

4 bytes         "CRNG" (Color RaNGe chunk ID)
1 longlong = 4 bytes
          length of chunk [8]
8 bytes         1 wordword = 2 bytes
 = reserved [0]
                1 wordword = 2 bytes
 = animation speed (16384 = 60 steps per second)
                1 wordword = 2 bytes
 = active [1] or inactive [0]
                1 byte = left/lower color animation limit
                1 byte = right/upper color animation limit

4 bytes         "CAMG" (Commodore AMiGa viewport mode chunk ID)
1 longlong = 4 bytes
          length of chunk [4]
1 longlong = 4 bytes
          viewport mode bits (bit 11 = HAM, bit 3 = interlaced)

4 bytes         "BODY" (BODY chunk ID)
1 longlong = 4 bytes
          length of chunk [# bytes of image data that follow]
? bytes         actual image data

  NOTES: Some of these chunks may not be present in every IFF file,
and may not be in this order.  You should always look for the ID bytes
to find a certain chunk.  All chunk IDs are followed by a longlong = 4 bytes
 value
that tells the size of the chunk (note that "ILBM" is not a chunk ID).
This is the number of bytes that FOLLOW the 4 ID bytes and size
longword.  The exception to this is the FORM chunk. The size longword
that follows the FORM ID is the size of the remainder of the file.
The FORM chunk must always be the first chunk in an IFF file.

  The R,G,B ranges of AMIGA and ST are different (AMIGA 0...15, ST
0...7), as is the maximum number of bitplanes (AMIGA: 5, ST: 4).

   Format of body data
An expanded picture is simply a bitmap.  The packing method is
PackBits, and is identical to MacPaint and DEGAS Elite compressed.
The (decompressed) body data appears in the following order:
line 1 plane 0 ... line 1 plane 1 ... ... line 1 plane m
        [line 1 mask (if appropriate)]
        line 2 plane 0 ... line 2 plane 1 ... ... line 2 plane m
        [line 2 mask (if appropriate)]
        ...
        line x plane 0 ... line x plane 1 ... ... line x plane m
        [line x mask (if appropriate)]
The FORM chunk identifies the type of data:
        "ILBM" = interleaved bit map
        "8SVX" = 8-bit sample voice
        "SMUS" = simple music score
        "FTXT" = formatted text (Amiga)