RGB Intermediate file format

From AtariForumWiki
Jump to: navigation, search
RGB Intermediate Format    *.RGB (low resolution only)

   This format was invented by Lars Michael to facilitate conversions between
standard ST picture formats and higher resolution formats like GIF and IFF.
It supports 12 bits of color resolution by keeping the red, green and blue
components in separate bit planes.

1 word          resolution (ignored)
16 word         palette (ignored)
16000 words     red plane (screen memory)
1 word          resolution (ignored)
16 word         palette (ignored)
16000 words     green plane (screen memory)
1 word          resolution (ignored)
16 word         palette (ignored)
16000 words     blue plane (screen memory)
------------
96102 bytes     total

The format was derived by concatenating three DEGAS .PI1 files together -- 
one for each color gun.  The RGB value for a pixel is constructed by looking
at the appropriate pixel in the red plane, green plane, and blue plane.  The
bitplanes are in standard ST low resolution screen RAM format, but where pixel
values in screen RAM refer to palette entries (0 through 15), pixel values
here correspond to absolute R, G, and B values.  The red, green, and blue
components for each pixel range from 0 to 15 (4 bits), yielding a total of
12 bits of color information per pixel.  Not coincidentally, this is exactly
the format of ST palette entries (although on ST's without the extended 
palette only the lower 3 bits of each color component are used).

You can view a single bit plane on a standard ST by splitting the .RGB file
into its three DEGAS .PI1 components and setting the palette to successively
brighter shades of gray.

Back to ST Picture Formats