AVS Image FormatWritten by Paul Bourke
The AVS image format (usul extension of ".x") is pretty straightforward. It consists of an 8 byte header followed by a,r,g,b per pixel, ordered top to bottom, left to right. (a == alpha, r == red, g = reen, b == blue) Each colour/alpha component is 1 unsigned byte. The header simply consists of the width and height of the image, each as 4 byte unsigned integers.
Note the format assumes a byte ordering as per SGI/Macintosh/Motorola processors, if reading an AVS image from a machine with the opposite byte ordering then the appropriate byte swapping is required (see the swapping in the C code below).
If you write a converter and want an image to test it on, try this one: mandrill.x.gz. It is 500x480 pixels.