Re: PCX support for gdk-pixbuf



Two more things I thought of while driving into work:

typedef struct pcx_header_s
{
	guchar signature;
	guchar version;
	guchar encoding;
	guchar bytes_per_pixel;
	gushort xmin;
	gushort ymin;
	gushort xmax;
	gushort ymax;
	gushort vres;
	gushort hres;
	guchar palette[48];
	guchar reserved;
	guchar color_layers;
	gushort bytes_per_line;
	gushort palette_type;
	guchar unused[58];

} pcx_header_t;

 * You should use guint16 not gushort to mean a 16 bit quantity

 * You need to handle byte swapping the 16 bit quantities on
   big-endian magines.

Regards,
                                        Owen




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]