From: Dirk Lemstra Date: Tue, 2 Jul 2019 18:54:25 +0000 (+0200) Subject: Fixed issue with reading the EXIFTAG_SUBJECTLOCATION. X-Git-Tag: 7.0.8-52~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d68366982b85afcb7a03436b8330678ca2e67246;p=imagemagick Fixed issue with reading the EXIFTAG_SUBJECTLOCATION. --- diff --git a/coders/tiff.c b/coders/tiff.c index 90283ab43..dae8375ef 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -189,7 +189,7 @@ static const ExifInfo { EXIFTAG_FOCALPLANEXRESOLUTION, TIFF_RATIONAL, 0, "exif:FocalPlaneXResolution" }, { EXIFTAG_FOCALPLANEYRESOLUTION, TIFF_RATIONAL, 0, "exif:FocalPlaneYResolution" }, { EXIFTAG_FOCALPLANERESOLUTIONUNIT, TIFF_SHORT, 0, "exif:FocalPlaneResolutionUnit" }, - { EXIFTAG_SUBJECTLOCATION, TIFF_SHORT, 0, "exif:SubjectLocation" }, + { EXIFTAG_SUBJECTLOCATION, TIFF_SHORT, 2, "exif:SubjectLocation" }, { EXIFTAG_EXPOSUREINDEX, TIFF_RATIONAL, 0, "exif:ExposureIndex" }, { EXIFTAG_SENSINGMETHOD, TIFF_SHORT, 0, "exif:SensingMethod" }, { EXIFTAG_FILESOURCE, TIFF_NOTYPE, 0, "exif:FileSource" }, @@ -859,6 +859,16 @@ static void TIFFGetEXIFProperties(TIFF *tiff,Image *image, if (TIFFGetField(tiff,exif_info[i].tag,&shorty,sans) == 1) (void) FormatLocaleString(value,MagickPathExtent,"%d",shorty); } + else if (exif_info[i].variable_length == 2) + { + uint16 + *shorty; + + shorty=0; + if ((TIFFGetField(tiff,exif_info[i].tag,&shorty,sans) == 1) && + (shorty != (uint16 *) NULL)) + (void) FormatLocaleString(value,MagickPathExtent,"%d",*shorty); + } else { int