summaryrefslogtreecommitdiffstats
path: root/4674b9a584fcb9ca5151c2c8b9104b5877a81d0c.patch
blob: 3bf4a3c6ff5ad62ab283188c23e276326164fef3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
From 4674b9a584fcb9ca5151c2c8b9104b5877a81d0c Mon Sep 17 00:00:00 2001
From: Cristy <urban-warrior@imagemagick.org>
Date: Thu, 30 Nov 2017 09:22:48 -0500
Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/888

---
 coders/dng.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/coders/dng.c b/coders/dng.c
index 069104dee9..17791019e0 100644
--- a/coders/dng.c
+++ b/coders/dng.c
@@ -161,25 +161,24 @@ static void SetDNGProperties(Image *image,const libraw_data_t *raw_info)
 
   (void) SetImageProperty(image,"dng:make",raw_info->idata.make);
   (void) SetImageProperty(image,"dng:camera.model.name",raw_info->idata.model);
-  (void) SetImageProperty(image,"dng:software",raw_info->idata.software);
   (void) FormatMagickTime(raw_info->other.timestamp,MagickPathExtent,timestamp);
   (void) SetImageProperty(image,"dng:create.date",timestamp);
+  (void) SetImageProperty(image,"dng:f.number",property);
+  (void) FormatLocaleString(property,MagickPathExtent,"%0.1f",
+    raw_info->other.iso_speed);
 #if LIBRAW_COMPILE_CHECK_VERSION_NOTLESS(0,18)
+  (void) SetImageProperty(image,"dng:software",raw_info->idata.software);
   if (*raw_info->shootinginfo.BodySerial != '\0')
     (void) SetImageProperty(image,"dng:serial.number",
       raw_info->shootinginfo.BodySerial);
   (void) FormatLocaleString(property,MagickPathExtent,"%0.2f",
     raw_info->other.FlashEC);
   (void) SetImageProperty(image,"dng:flash.exposure.compensation",property);
-#endif
   (void) FormatLocaleString(property,MagickPathExtent,"1/%0.1f",
     1.0/raw_info->other.shutter);
   (void) SetImageProperty(image,"dng:exposure.time",property);
   (void) FormatLocaleString(property,MagickPathExtent,"%0.1f",
     raw_info->other.aperture);
-  (void) SetImageProperty(image,"dng:f.number",property);
-  (void) FormatLocaleString(property,MagickPathExtent,"%0.1f",
-    raw_info->other.iso_speed);
   (void) SetImageProperty(image,"dng:iso.setting",property);
   (void) FormatLocaleString(property,MagickPathExtent,"%0.1f",
     raw_info->lens.EXIF_MaxAp);
@@ -212,6 +211,7 @@ static void SetDNGProperties(Image *image,const libraw_data_t *raw_info)
   (void) FormatLocaleString(property,MagickPathExtent,"%d mm",
     raw_info->lens.FocalLengthIn35mmFormat);
   (void) SetImageProperty(image,"dng:focal.length.in.35mm.format",property);
+#endif
 }
 #endif
 
@@ -382,6 +382,7 @@ static Image *ReadDNGImage(const ImageInfo *image_info,ExceptionInfo *exception)
             profile=DestroyStringInfo(profile);
           }
       }
+#if LIBRAW_COMPILE_CHECK_VERSION_NOTLESS(0,18)
     if (raw_info->idata.xmpdata)
       {
         profile=BlobToStringInfo(raw_info->idata.xmpdata,
@@ -392,6 +393,7 @@ static Image *ReadDNGImage(const ImageInfo *image_info,ExceptionInfo *exception)
             profile=DestroyStringInfo(profile);
           }
       }
+#endif
     SetDNGProperties(image,raw_info);
     libraw_close(raw_info);
     return(image);