convert 24bit jpg to 8bit bmp

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
timkelley66
Posts: 1
Joined: 2011-11-03T09:17:04-07:00
Authentication code: 8675308

convert 24bit jpg to 8bit bmp

Post by timkelley66 »

I am trying to convert (using convert.exe) a jpg to a bmp file and change the color depth to 8 bits. Here are the commands I have tried:
Convert.exe 501021.jpg -depth 8 -resize 172x228! 501021.bmp
Convert.exe 501021.jpg -color 256 -resize 172x228! 501021.bmp
The new bmp file is still at 24bits.
Is there another option I need to be using?

IM 6.6.1-7 Q16
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert 24bit jpg to 8bit bmp

Post by fmw42 »

The problem is that you need to resize before -colors 256 or -depth 8. The resizing will create new colors.
Post Reply