summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Real <github@tildepipe.org>2012-03-22 19:44:32 +0100
committerDennis Real <github@tildepipe.org>2012-03-22 19:44:32 +0100
commit3c284dc81dcb26249114b7ecf32ed0000f492b8b (patch)
tree8895d783dfbea580d6c627098bed626caec7bf8b
parentad5aea8cb853cc9d1b322c69f4812ad0bcb08ef3 (diff)
Support for Active D-Lightning
-rw-r--r--src/exif_cfg.h1
-rw-r--r--src/exif_nikon.c65
2 files changed, 66 insertions, 0 deletions
diff --git a/src/exif_cfg.h b/src/exif_cfg.h
index 5ceb357..390c1ad 100644
--- a/src/exif_cfg.h
+++ b/src/exif_cfg.h
@@ -72,6 +72,7 @@ const unsigned int Exif_makernote_nikon_tag_list [] =
132, /* Lens */
171, /* Digital Vari-Program */
+ 34, /* ActiveD-Lighting */
183, /* AFInfo2 */
EXIF_NIKON_MAKERNOTE_END /* end marker */
diff --git a/src/exif_nikon.c b/src/exif_nikon.c
index 42f1137..753a8bf 100644
--- a/src/exif_nikon.c
+++ b/src/exif_nikon.c
@@ -100,6 +100,7 @@ static void exn_get_prim_af_pt(unsigned int phasedetectaf,
unsigned int primafpt,
char * buffer,
unsigned int maxsize);
+static void exn_get_mnote_nikon_34(ExifData *ed, char * buffer, unsigned int maxsize);
static void exn_get_mnote_nikon_168(ExifData *ed, char * buffer, unsigned int maxsize);
static void exn_get_mnote_nikon_183(ExifData *ed, char * buffer, unsigned int maxsize);
@@ -164,6 +165,63 @@ static void exn_get_prim_af_pt(unsigned int phasedetectaf,
+/* get ActiveD-Lighting (34) info */
+static void exn_get_mnote_nikon_34(ExifData *ed, char * buffer, unsigned int maxsize)
+{
+ char buf[EXIF_STD_BUF_LEN];
+ unsigned int data = 0;
+ char *answer;
+
+ buf[0] = '\0';
+ exif_get_mnote_tag(ed, 34, buf, sizeof(buf));
+ sscanf(buf, "(null): %u", &data);
+
+ switch(data)
+ {
+ case 0:
+ {
+ answer = "Off";
+ }
+ break;
+ case 1:
+ {
+ answer = "Low";
+ }
+ break;
+ case 3:
+ {
+ answer = "Normal";
+ }
+ break;
+ case 5:
+ {
+ answer = "High";
+ }
+ break;
+ case 7:
+ {
+ answer = "Extra High";
+ }
+ break;
+ case 65535:
+ {
+ answer = "Auto";
+ }
+ break;
+ default:
+ {
+ answer = "N/A"; /* this is not a nikon value */
+ }
+
+ }
+
+ snprintf(buffer + strlen(buffer), maxsize - strlen(buffer), "Active D-Lightning: %s\n",
+ answer);
+
+}
+
+
+
/* get nikon Flash info: control mode (168) info */
static void exn_get_mnote_nikon_168(ExifData *ed, char * buffer, unsigned int maxsize)
{
@@ -274,6 +332,13 @@ void exn_get_mnote_nikon_tags(ExifData *ed, unsigned int tag, char * buffer, uns
}
}
break;
+
+ case 34:
+ {
+ /* ActiveD-Lighting */
+ exn_get_mnote_nikon_34(ed, buffer + strlen(buffer), maxsize - strlen(buffer));
+ }
+ break;
case 168:
{