BMP Color Palette
Posted: 2012-08-09T07:51:50-07:00
Hi,
I'm not sure if this is an accidental bug or just how bmps work in this version of ImageMagick but it's an issue.
I'm trying to convert a color PDF to a 500ppi grayscale bmp. I'm 90% of the way there but I'm having some issues with the bmp color palette. My bmp looks right and when I use identify -verbose everything in there looks fine but if I open the bmp using a hex editor I can see that the color palette still contains colors which means my receiving program rejects it.
I'm using convert -compress None -type GrayScale -colors 256 -density 500 test.pdf test.bmp
I've tried using -colors 256 +dither -treedepth 8 based on a few things a saw in other forums but it made no difference. I tried using -remap with a bmp that I knew had the right color palette, I tried converting the pdf to a pgm first, I tried converting to a ps first, I always get the wrong color palette. I'd really appreciate any help possible on this.
The color palette actually starts with three colors, red, green, blue, and then puts the letters sRGB in then goes on to have the normal grayscale color palette (01 01 01 00 02 02 02 00 etc.) This isn't standard BMP format as far as I know and suggests that this is a bug whether or not it usually affects peoples ability to use the BMP.
I'm not sure if this is an accidental bug or just how bmps work in this version of ImageMagick but it's an issue.
I'm trying to convert a color PDF to a 500ppi grayscale bmp. I'm 90% of the way there but I'm having some issues with the bmp color palette. My bmp looks right and when I use identify -verbose everything in there looks fine but if I open the bmp using a hex editor I can see that the color palette still contains colors which means my receiving program rejects it.
I'm using convert -compress None -type GrayScale -colors 256 -density 500 test.pdf test.bmp
I've tried using -colors 256 +dither -treedepth 8 based on a few things a saw in other forums but it made no difference. I tried using -remap with a bmp that I knew had the right color palette, I tried converting the pdf to a pgm first, I tried converting to a ps first, I always get the wrong color palette. I'd really appreciate any help possible on this.
The color palette actually starts with three colors, red, green, blue, and then puts the letters sRGB in then goes on to have the normal grayscale color palette (01 01 01 00 02 02 02 00 etc.) This isn't standard BMP format as far as I know and suggests that this is a bug whether or not it usually affects peoples ability to use the BMP.