]> granicus.if.org Git - imagemagick/commitdiff
Distinquish DNG format from TIFF
authorCristy <urban-warrior@imagemagick.org>
Sun, 25 Aug 2019 13:32:49 +0000 (09:32 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sun, 25 Aug 2019 13:32:49 +0000 (09:32 -0400)
coders/tiff.c

index 4a877a12aaedac1e50df038bab7326f962b9d627..8114f05c1c735e9b9eac649696ca0cdcab136cf7 100644 (file)
@@ -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))