From: dirk Date: Sun, 14 Sep 2014 08:53:21 +0000 (+0000) Subject: Improved reporting the version of a bmp file. X-Git-Tag: 7.0.1-0~2014 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5816af430187d3c7c303d4e6bad69f04cc813ff6;p=imagemagick Improved reporting the version of a bmp file. --- diff --git a/MagickCore/constitute.c b/MagickCore/constitute.c index cea98cae6..567ee086f 100644 --- a/MagickCore/constitute.c +++ b/MagickCore/constitute.c @@ -603,7 +603,7 @@ MagickExport Image *ReadImage(const ImageInfo *image_info, next->taint=MagickFalse; GetPathComponent(magick_filename,MagickPath,magick_path); - if (*magick_path == '\0') + if (*magick_path == '\0' && *next->magick == '\0') (void) CopyMagickString(next->magick,magick,MaxTextExtent); (void) CopyMagickString(next->magick_filename,magick_filename, MaxTextExtent); diff --git a/coders/bmp.c b/coders/bmp.c index 43b71d7c2..069f9c476 100644 --- a/coders/bmp.c +++ b/coders/bmp.c @@ -615,6 +615,7 @@ static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception) /* OS/2 BMP image file. */ + (void) CopyMagickString(image->magick,"BMP2",MaxTextExtent); bmp_info.width=(ssize_t) ((short) ReadBlobLSBShort(image)); bmp_info.height=(ssize_t) ((short) ReadBlobLSBShort(image)); bmp_info.planes=ReadBlobLSBShort(image); @@ -770,6 +771,8 @@ static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception) image->gamma=(bmp_info.gamma_scale.x+bmp_info.gamma_scale.y+ bmp_info.gamma_scale.z)/3.0; } + else + (void) CopyMagickString(image->magick,"BMP3",MaxTextExtent); if (bmp_info.size > 108) {