Page 1 of 1

identify -ping sample.bmp[0] reports incorrect resolution

Posted: 2012-03-29T07:05:37-07:00
by Oleksiis
This is caused by the following code fragment, which terminates further processing.
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.
    */
Copying resolution from BMP header is done a bit later in the code:
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;
I understand that bmp does not support multiple frames, but the first frame should work IMO.

Re: identify -ping sample.bmp[0] reports incorrect resolutio

Posted: 2012-03-29T07:18:48-07:00
by magick
We'll add a patch to the ImageMagick Subversion trunk by sometime tomorrow. Thanks.