From: Dirk Lemstra Date: Fri, 30 Jun 2017 19:32:45 +0000 (+0200) Subject: Revert change where pinging a tiff file would not read the profiles. X-Git-Tag: 7.0.6-1~105 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cb4194abba65cb646eaa7377b948f1d086d885a5;p=imagemagick Revert change where pinging a tiff file would not read the profiles. --- diff --git a/coders/tiff.c b/coders/tiff.c index f92327693..68a15f6a2 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -578,8 +578,7 @@ static toff_t TIFFGetBlobSize(thandle_t image) return((toff_t) GetBlobSize((Image *) image)); } -static void TIFFGetProfiles(TIFF *tiff,Image *image,MagickBooleanType ping, - ExceptionInfo *exception) +static void TIFFGetProfiles(TIFF *tiff,Image *image,ExceptionInfo *exception) { uint32 length; @@ -588,37 +587,34 @@ static void TIFFGetProfiles(TIFF *tiff,Image *image,MagickBooleanType ping, *profile; length=0; - if (ping == MagickFalse) - { #if defined(TIFFTAG_ICCPROFILE) - if ((TIFFGetField(tiff,TIFFTAG_ICCPROFILE,&length,&profile) == 1) && - (profile != (unsigned char *) NULL)) - (void) ReadProfile(image,"icc",profile,(ssize_t) length,exception); + if ((TIFFGetField(tiff,TIFFTAG_ICCPROFILE,&length,&profile) == 1) && + (profile != (unsigned char *) NULL)) + (void) ReadProfile(image,"icc",profile,(ssize_t) length,exception); #endif #if defined(TIFFTAG_PHOTOSHOP) - if ((TIFFGetField(tiff,TIFFTAG_PHOTOSHOP,&length,&profile) == 1) && - (profile != (unsigned char *) NULL)) - (void) ReadProfile(image,"8bim",profile,(ssize_t) length,exception); + if ((TIFFGetField(tiff,TIFFTAG_PHOTOSHOP,&length,&profile) == 1) && + (profile != (unsigned char *) NULL)) + (void) ReadProfile(image,"8bim",profile,(ssize_t) length,exception); #endif #if defined(TIFFTAG_RICHTIFFIPTC) - if ((TIFFGetField(tiff,TIFFTAG_RICHTIFFIPTC,&length,&profile) == 1) && - (profile != (unsigned char *) NULL)) - { - if (TIFFIsByteSwapped(tiff) != 0) - TIFFSwabArrayOfLong((uint32 *) profile,(size_t) length); - (void) ReadProfile(image,"iptc",profile,4L*length,exception); - } + if ((TIFFGetField(tiff,TIFFTAG_RICHTIFFIPTC,&length,&profile) == 1) && + (profile != (unsigned char *) NULL)) + { + if (TIFFIsByteSwapped(tiff) != 0) + TIFFSwabArrayOfLong((uint32 *) profile,(size_t) length); + (void) ReadProfile(image,"iptc",profile,4L*length,exception); + } #endif #if defined(TIFFTAG_XMLPACKET) - if ((TIFFGetField(tiff,TIFFTAG_XMLPACKET,&length,&profile) == 1) && - (profile != (unsigned char *) NULL)) - (void) ReadProfile(image,"xmp",profile,(ssize_t) length,exception); + if ((TIFFGetField(tiff,TIFFTAG_XMLPACKET,&length,&profile) == 1) && + (profile != (unsigned char *) NULL)) + (void) ReadProfile(image,"xmp",profile,(ssize_t) length,exception); #endif - if ((TIFFGetField(tiff,34118,&length,&profile) == 1) && - (profile != (unsigned char *) NULL)) - (void) ReadProfile(image,"tiff:34118",profile,(ssize_t) length, - exception); - } + if ((TIFFGetField(tiff,34118,&length,&profile) == 1) && + (profile != (unsigned char *) NULL)) + (void) ReadProfile(image,"tiff:34118",profile,(ssize_t) length, + exception); if ((TIFFGetField(tiff,37724,&length,&profile) == 1) && (profile != (unsigned char *) NULL)) (void) ReadProfile(image,"tiff:37724",profile,(ssize_t) length,exception); @@ -1345,7 +1341,7 @@ RestoreMSCWarning SetImageColorspace(image,CMYKColorspace,exception); if (photometric == PHOTOMETRIC_CIELAB) SetImageColorspace(image,LabColorspace,exception); - TIFFGetProfiles(tiff,image,image_info->ping,exception); + TIFFGetProfiles(tiff,image,exception); TIFFGetProperties(tiff,image,exception); option=GetImageOption(image_info,"tiff:exif-properties"); if (IsStringFalse(option) == MagickFalse) /* enabled by default */