summaryrefslogtreecommitdiff
path: root/src/exif_canon.c
diff options
context:
space:
mode:
authorDennis Real <github@tildepipe.org>2012-03-24 14:41:15 +0100
committerDennis Real <github@tildepipe.org>2012-03-24 14:41:15 +0100
commit10b7b1e3e10ba650b240a742947cb6850bbadd23 (patch)
tree801dbba31979dfea932f54a5d8d5187d7e325b80 /src/exif_canon.c
parent3c284dc81dcb26249114b7ecf32ed0000f492b8b (diff)
Support for Canon Exif makernote tags
Diffstat (limited to 'src/exif_canon.c')
-rw-r--r--src/exif_canon.c61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/exif_canon.c b/src/exif_canon.c
new file mode 100644
index 0000000..8801899
--- /dev/null
+++ b/src/exif_canon.c
@@ -0,0 +1,61 @@
+/* exif_canon.c
+
+Copyright (C) 2012 Dennis Real.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies of the Software and its documentation and acknowledgment shall be
+given in the documentation and software packages that this Software was
+used.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#ifdef HAVE_LIBEXIF
+
+#include <stdio.h>
+#include <libexif/exif-data.h>
+
+#include "feh.h"
+#include "debug.h"
+#include "exif.h"
+#include "exif_canon.h"
+
+
+
+/* get interesting canon maker note tags in readable form */
+void exc_get_mnote_canon_tags(ExifData *ed, unsigned int tag, char * buffer, unsigned int maxsize)
+{
+ /* char buf[EXIF_STD_BUF_LEN];
+
+ buf[0] = '\0';
+ exif_get_tag(ed, EXIF_IFD_EXIF, EXIF_TAG_FLASH, buf, sizeof(buf));
+ exif_trim_spaces(buf); */
+
+ switch(tag)
+ {
+ default:
+ {
+ /* normal makernote tags without special treatment */
+ exif_get_mnote_tag(ed, tag, buffer, maxsize);
+ }
+ break;
+ }
+
+
+ return;
+}
+
+#endif