Page 1 of 1

Cannot write 16-colour PCX files

Posted: 2011-10-01T18:41:15-07:00
by Malvineous
Hi,

I'm trying to edit a 16-colour (4bpp) PCX file, but ImageMagick always seems to convert it to 256-colour (8bpp).

Code: Select all

$ identify input.pcx
input.pcx PCX 320x200 320x200+0+0 8-bit PseudoClass 16c 26KB 0.000u 0:00.000
$ convert input.pcx -depth 4 out.pcx && identify out.pcx
out.pcx PCX 320x200 320x200+0+0 8-bit PseudoClass 256c 22.6KB 0.010u 0:00.010
$ convert input.pcx -depth 4 out.png && identify out.png
out.png PNG 320x200 320x200+0+0 8-bit PseudoClass 16c 4.99KB 0.000u 0:00.000
It seems to be able to write 4bpp PNG images correctly, but not 4bpp PCX images. Am I doing something wrong or is the PCX format not fully supported?