identify -ping sample.bmp[0] reports incorrect resolution
Posted: 2012-03-29T07:05:37-07:00
This is caused by the following code fragment, which terminates further processing.
coders/bmp.c (~line 897):
Copying resolution from BMP header is done a bit later in the code:
coders/bmp.c (~line 941):
I understand that bmp does not support multiple frames, but the first frame should work IMO.
coders/bmp.c (~line 897):
Code: Select all
if ((image_info->ping != MagickFalse) && (image_info->number_scenes != 0))
if (image->scene >= (image_info->scene+image_info->number_scenes-1))
break;
/*
Read image data.
*/
coders/bmp.c (~line 941):
Code: Select all
/*
Initialize image structure.
*/
image->x_resolution=(double) bmp_info.x_pixels/100.0;
image->y_resolution=(double) bmp_info.y_pixels/100.0;
image->units=PixelsPerCentimeterResolution;