Page 1 of 1

Indexed BMP conversion

Posted: 2015-08-07T05:16:19-07:00
by Hietala
Hello, I'm trying to convert some 24 bit BMPs into 8 bit with a palette that contains only the used colors, but that always results in a bitmap with the 256 palette entries even when the image use 4 or 5 colors, so my question is if it is possible to have any unused entries removed, I have tried this basically

Code: Select all

convert inimage.bmp -compress None -colors 256 BMP3:outimage.bmp
I also tried -type Palette and -depth 8

Version: ImageMagick 6.9.0-0 Q16 x86 2014-11-14
Platform: Windows 7

Re: Indexed BMP conversion

Posted: 2015-08-07T09:19:56-07:00
by fmw42
see -remap with +dither (or -dither none) at http://www.imagemagick.org/Usage/quantize/#remap. Prepare ahead of time the colors your want to keep and make them into an image (one pixel per color)