[comp.graphics] Z-Soft's PCX image file format

naughton@wind.Eng.Sun.COM (Patrick Naughton) (03/07/91)

Does anyone have a description of the 128 byte header of a .PCX file
that they want to share with me?

I know about the code in pcxtopbm.c, unfortunately it doesn't say much
about the general format, it just extracts a few bits of information
from it, enough to create a 1 bit deep pbm file.

Thanks in advance.

-Patrick

-- 
    ______________________________________________________________________
    Patrick J. Naughton				   email: naughton@sun.com
    Sun Laboratories				   voice: (415) 336 - 1080

knoll@well.sf.ca.us (John Knoll) (03/10/91)

OK, how about this:

/* PCX header */
typedef struct PCXheader{
   	char	manufacturer;
    char 	version;
    char	encoding;
    char	bits_per_pixel;
    short 	xmin,ymin;
    short	xmax,ymax;
    short	hres;
    short	vres;
    char	palette[48];
    char	reserved;
    char	color_planes;
    short	rowbytes;
    short	palette_type;
    char	filler[58];
} PCXheader;