BMP, GIF and indexed color spaces

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
redhog
Posts: 1
Joined: 2012-11-14T02:20:14-07:00
Authentication code: 6789

BMP, GIF and indexed color spaces

Post by redhog »

Hi!

There seems to be a bug when converting GIF to a 1-bit black and white BMP. I came across this bug when writing a web-application using ImageMagick to process user uploaded images for printing on a thermo-printer, which requires 1-bit BMPs. Here is an example of the problem (note the "8-bit" vs "1-bit" in the two outputs):

C:\>convert.exe test.gif -remap printer_palette.bmp test.out.bmp
C:\>identify.exe test.out.bmp
test.out.bmp BMP 100x466 100x466+0+0 8-bit sRGB 187KB 0.000u 0:00.000

C:\>convert.exe test.png -remap printer_palette.bmp test.out.bmp
C:\>identify.exe test.out.bmp
test.out.bmp BMP 640x400 640x400+0+0 1-bit sRGB 2c 32.1KB 0.016u 0:00.020


This was tested with 6.7.9-7 and 6.8.0-Q16 on Windows 7.
Post Reply