ImageMagick 7.0.2 always returning BMP3 for BMP Images

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
nabarun
Posts: 6
Joined: 2016-04-26T18:19:23-07:00
Authentication code: 1151

ImageMagick 7.0.2 always returning BMP3 for BMP Images

Post by nabarun »

Will there be any scenario where identify return BMP2 or BMP4 format (default behavior). I think by default it will always return BMP3

ImageMagick-7.0.2-7/bin$ ./identify -format "%m\n%w\n%h\n" /home/Pictures/tiger.bmp
BMP3
320
240
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: ImageMagick 7.0.2 always returning BMP3 for BMP Images

Post by fmw42 »

I think it depends upon which BMP format your image actually is. If it is BMP4 it probably returns BMP. If BMP3, then it probably returns BMP3, If it is BMP2, then it probably returns BMP2.

Example:

Code: Select all

convert rose: rose.bmp
identify -format "%m\n%w\n%h\n" rose.bmp
BMP
70
46
So rose.bmp is BMP which is BMP4

Code: Select all

convert rose: BMP2:rose.bmp
Fred-Weinhauss-Mac-mini:desktop fred$ identify -format "%m\n%w\n%h\n" rose.bmp
BMP2
70
46
Here I explicitly make rose.bmp BMP2 format, so identify returns BMP2

The same with IM 7 using magick in place of convert and magick identify in place of identify.
Post Reply