summaryrefslogtreecommitdiff
path: root/src/exif.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.c
parent3c284dc81dcb26249114b7ecf32ed0000f492b8b (diff)
Support for Canon Exif makernote tags
Diffstat (limited to 'src/exif.c')
-rw-r--r--src/exif.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/exif.c b/src/exif.c
index ed18eb5..a30b2ef 100644
--- a/src/exif.c
+++ b/src/exif.c
@@ -34,6 +34,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "options.h"
#include "debug.h"
#include "exif.h"
+#include "exif_canon.h"
#include "exif_nikon.h"
#include "exif_cfg.h"
@@ -239,7 +240,7 @@ ExifData * exif_get_data(char *path)
-/* get exif data in readable form */
+/* get all exif data in readable form */
void exif_get_info(ExifData * ed, char *buffer, unsigned int maxsize)
{
ExifEntry *entry = NULL;
@@ -272,14 +273,12 @@ void exif_get_info(ExifData * ed, char *buffer, unsigned int maxsize)
if (exif_entry_get_value(entry, buf, sizeof(buf)))
{
exif_trim_spaces(buf);
-
+
if ( (strcmp(buf, "NIKON CORPORATION") == 0)
|| (strcmp(buf, "Nikon") == 0)
|| (strcmp(buf, "NIKON") == 0)
)
{
- /* this is a nikon camera */
-
/* show nikon makernote exif tags. list must be defined in exif_cfg.h */
i=0;
while ( (Exif_makernote_nikon_tag_list[i] != EXIF_NIKON_MAKERNOTE_END) && (i < USHRT_MAX) )
@@ -290,7 +289,21 @@ void exif_get_info(ExifData * ed, char *buffer, unsigned int maxsize)
}
}
-
+ else if ( (strcmp(buf, "Canon") == 0) )
+ {
+ /* show canon makernote exif tags. list must be defined in exif_cfg.h */
+ i=0;
+ while ( (Exif_makernote_canon_tag_list[i] != EXIF_CANON_MAKERNOTE_END) && (i < USHRT_MAX) )
+ {
+ exc_get_mnote_canon_tags(ed, Exif_makernote_canon_tag_list[i],
+ buffer + strlen(buffer), maxsize - strlen(buffer));
+ i++;
+ }
+
+ }
+ else
+ {
+ }
}
}