From: Cristy Date: Sun, 25 Aug 2019 13:32:49 +0000 (-0400) Subject: Distinquish DNG format from TIFF X-Git-Tag: 7.0.8-63~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=77ad22e52c79102b2258ec9fcd6d86901da280ca;p=imagemagick Distinquish DNG format from TIFF --- diff --git a/coders/tiff.c b/coders/tiff.c index 4a877a12a..8114f05c1 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -701,7 +701,11 @@ static void TIFFGetProfiles(TIFF *tiff,Image *image,ExceptionInfo *exception) #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); + { + (void) ReadProfile(image,"xmp",profile,(ssize_t) length,exception); + if (strstr((char *) profile,"dc:format=\"image/dng\"") != (char *) NULL) + (void) CopyMagickString(image->magick,"DNG",MagickPathExtent); + } #endif if ((TIFFGetField(tiff,34118,&length,&profile) == 1) && (profile != (unsigned char *) NULL))