Page 1 of 1

ImageMagick 7.0.2 always returning BMP3 for BMP Images

Posted: 2016-08-24T13:50:04-07:00
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

Re: ImageMagick 7.0.2 always returning BMP3 for BMP Images

Posted: 2016-08-24T15:09:06-07:00
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.