Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using imagemagick convert to convert this image to a bmp. However for some reason the tool I am using doesn't like the bitmap. If I save the image as a png and convert it to a 24bit bmp its fine. I tried using the following command bit it doesn't like it.

convert -verbose  -depth 8 -type truecolor infile outfile.bmp

Looking at the file I see that the 'bad' bmp has

BMÊp1 (0's) Š

The good one has

BMvp1 (0's) 6
share|improve this question
What does "doesn't like" mean? Error messages? Corruption? What's the name of this tool? Can you provide (upload) examples of both bitmaps? [maybe not to imgur, since they might reencode it]. – Bob Jul 16 '14 at 16:21

1 Answer 1

I have had some trouble with BMP conversions too. I have typically specified BMP3:outfile.bmp and I normally get 24 bit BMP files. sometimes I get an 8 bit BMP when converting JPEG files. I just tried the -type truecolor (having seen it here) and now it looks like I get a 24 bit BMP in the cases where I used to get only 8 bits.

I also use these switches:

-units PixelsPerInch -density 72 -compress None -depth 24

the -depth 24 should do a 24 bit BMP (the depth -8 in your case may also be causing a problem) but as I said I sometimes get 8 bits even with the 24 specified.

the -units and -density cases corrected a problem where sometimes I would get a 0 for the biXPelsPerMeter and biYPelsPerMeter fields in the BMP header (it did not seem to cause a problem though). by the way I have not found a good explanation of these 2 fields.

the -compress None was required because sometimes a conversion generated a compressed BMP - no logical reason for doing that was found.

hopefully this will be of some help but I am not an expert on this subject - I just tried a few things and looked around using Google and came up with the above switch settings.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.