Hello,
I am in an unfortunate situation to convert 16bit grayscale (single channel) TIF to 8bit grayscale BMP. ImageJ does a perfect job for this, but my IM does not (version 6.3.3). More specifically, IM saves BMP only in RGB mode even with -colorspace Gray or -type Grayscale options specified, resulting in 3x larger file size than desired (because of the three redundant channels R=G=B=256 grayscale).
What is the right way of doing this using IM? Or, perhaps IM just does not support single-channel 8bit grayscale BMP?
Thanks,
Jun
does IM support grayscale BMP? (as opposed to RGB)
Re: does IM support grayscale BMP? (as opposed to RGB)
Have you tried adding -colors 256 to your command line?
Re: does IM support grayscale BMP? (as opposed to RGB)
Yes I did, and it did not work in that all three RGB channels are still there.
-
- Posts: 1015
- Joined: 2005-03-21T21:16:57-07:00
Re: does IM support grayscale BMP? (as opposed to RGB)
Try this:
I'm not sure if all those options are needed but the result is an 8-bit grayscale BMP.
Pete
Code: Select all
convert input_image -colorspace gray -quantize gray -depth 8 -colors 256 bmp2:output.bmp
Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
See my message in this topic for a link to a zip of all the files.