write "color" PCX files (stupid bug)

This commit is contained in:
Jeff Teunissen 2011-01-09 04:34:35 -05:00
parent dfbbda37af
commit d764ef80d0
2 changed files with 2 additions and 2 deletions

View file

@ -43,7 +43,7 @@ typedef struct
char reserved; ///< should be 0
char color_planes; ///< Number of color planes
unsigned short bytes_per_line; ///< Number of bytes for a scan line (per plane). According to ZSoft, must be an even number.
unsigned short palette_type;
unsigned short palette_type; ///< Palette info: 1 = color, 2 = greyscale
char filler[58];
} pcx_t;

View file

@ -168,7 +168,7 @@ EncodePCX (byte * data, int width, int height,
pcx->vres = LittleShort ((short) height);
pcx->color_planes = 1; // chunky image
pcx->bytes_per_line = LittleShort ((short) width);
pcx->palette_type = LittleShort (2); // not a grey scale
pcx->palette_type = LittleShort (1); // not a grey scale
// pack the image
pack = (byte *) &pcx[1];