Images & Graphics Header

Alias PIX File Format Information.

FORMAT DETAILS:

Because this format is sourced on IRIX, the word format is bit[15..0]. Fetched words will have to be swapped for PC based readers.

First, a 10-byte header:

BYTES           DESCRIPTION

  0, 1          Width -- X res in pixels.
  2, 3          Height -- Y res in pixels.
  4, 5          X offset -- unused (obsolete, but still present).
  6, 7          Y offset -- unused (obsolete, but still present).
  8, 9          Bits per pixel -- always 0x18, or 8 bits each of red, green,
                and blue (they have no other supported bit depth at this time)

The pixels are then run-length encoded in 4 byte packets on a per-scanline basis, starting with the top scanline in the image. Individual runs do not extend beyond a single scanline.

PACKET
BYTE            RANGE           DESCRIPTION

  0             0x01 - 0xFF     Run length - number of pixels in succession
                                with given RGB.
  1             0x00 - 0xFF     Blue component.
  2             0x00 - 0xFF     Green component.
  3             0x00 - 0xFF     Red component.

Here's a sample:

00000000  0008 0006 0000 0005 0018 08FF 0000 08CC
00000020  0000 0899 0000 0866 0000 0833 0000 0800
00000040  0000

This sample describes an 8 x 6 ramp from blue (at the top of the image) to black. The 10 byte header is easy enough (note the obsolete offset info of 0, 5): [0008 0006 0000 0005 0018]. This is followed by [08FF 0000], which is 8 pixels of [FF 00 00], or pure blue. All 8 bytes of the first line are satisfied, so the next packet begins the next scan line: [08CC 0000], and so on.

FORMAT BACKGROUND:

Alias has recently been purchased by SGI, merged with another company, Wavefront, and is now Alias | Wavefront. PowerAnimator, their SGI-based 3D modeler / renderer package uses a simple file format called PIX for individual images. There is a more complex format that references multiple PIX files as layers of a larger file (along with alpha channel matte files) that is used by their StudioPaint product, but it's so hopelessly huge and complex that it's better to merge all the layers using their software and then decode the resulting PIX.

[This information was kindly provided by Rob Neve]

icon bar
MédiaTel | Map | Search | Contact Us