Page 1 of 1

8-bit Grayscale BMP

Posted: 2007-03-07T16:42:04-07:00
by compmaniac
I have two 8-bit grayscale bmps.

I want to composite one over the other, and still maintain the 8-bit and grayscale (in bmp format)

How would I maintain the grayscale and 8-bit, or if that's not possible, could somebody tell me how to convert an RGB 24-bit bmp to grayscale 8-bit? Thanks.

Re: 8-bit Grayscale BMP

Posted: 2007-03-07T21:22:19-07:00
by anthony
See IM Examples, Misc Formats, BMP
http://www.imagemagick.org/Usage/formats/#bmp

Basically make sure your image is 8bit index compatible (eg less that 256 colors)
by using a "-colors 256" operation.

If BM is GIF-like with transparency handling (I don't know for BMP) you may need

Code: Select all

-quantize transparent   -colors 254   -channel A   -threshold 50%

instead.

This is actually what IM does automatically for GIF with thransparency, it just has other options with BMP, so you may need to DIY.

Re: 8-bit Grayscale BMP

Posted: 2007-03-08T05:19:19-07:00
by compmaniac
Thanks, but after the -colors 256 operation on a 192kb file, the file is now around 3kb ish...

Am I supposed to type the following command to get it back to 65kb?

convert test.bmp bmp3:test.bmp

?

Sorry if I'm not doing it correctly.

I need to get an 8-bit file (around 65kb) from a 24-bit, regular grayscale BMP ( around 192kb)

I'm using 256x256 images.