Skip to content

Commit

Permalink
https://github.com/ImageMagick/ImageMagick/issues/1748
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Oct 13, 2019
1 parent 2dc57a2 commit 14ba3e4
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions coders/tiff.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,9 +648,20 @@ static void TIFFGetProfiles(TIFF *tiff,Image *image)
if ((TIFFGetField(tiff,TIFFTAG_XMLPACKET,&length,&profile) == 1) &&
(profile != (unsigned char *) NULL))
{
StringInfo
*dng;

(void) ReadProfile(image,"xmp",profile,(ssize_t) length);
if (strstr((char *) profile,"dc:format=\"image/dng\"") != (char *) NULL)
(void) CopyMagickString(image->magick,"DNG",MagickPathExtent);
dng=BlobToStringInfo(profile,length);
if (dng != (StringInfo *) NULL)
{
const char
*target = "dc:format=\"image/dng\"";

if (strstr((char *) GetStringInfoDatum(dng),target) != (char *) NULL)
(void) CopyMagickString(image->magick,"DNG",MagickPathExtent);
dng=DestroyStringInfo(dng);
}
}
#endif
if ((TIFFGetField(tiff,34118,&length,&profile) == 1) &&
Expand Down

0 comments on commit 14ba3e4

Please sign in to comment.