diff src/exiv2.cc @ 212:c7021159079d

differentiate among normal image, raw image and metadata removed raw extension lists on various places and fixed most of the Exiv2 warnings todo: configuration and a special icons for unreadable raw or metadata
author nadvornik
date Sun, 30 Mar 2008 11:47:14 +0000
parents 0ca12db715b7
children 9995c5fb202a
line wrap: on
line diff
--- a/src/exiv2.cc	Sun Mar 30 07:14:37 2008 +0000
+++ b/src/exiv2.cc	Sun Mar 30 11:47:14 2008 +0000
@@ -42,6 +42,7 @@
 #include <glib.h> 
 #include "gqview.h"
 #include "exif.h"
+#include "filelist.h"
 
 }
 
@@ -106,7 +107,7 @@
 
 ExifData *exif_read(gchar *path, gchar *sidecar_path, gint parse_color_profile)
 {
-	printf("exif %s %s\n", path, sidecar_path ? sidecar_path : "-");
+	if (debug) printf("exif read %s,  sidecar: %s\n", path, sidecar_path ? sidecar_path : "-");
 	try {
 		return new ExifData(path, sidecar_path, parse_color_profile);
 	}
@@ -683,8 +684,6 @@
 }
 
 
-const static char *raw_ext_list[] = { ".cr2", ".nef", ".pef", ".arw", NULL };
-
 extern "C" gint format_raw_img_exif_offsets_fd(int fd, const gchar *path,
 				    unsigned char *header_data, const guint header_len,
 				    guint *image_offset, guint *exif_offset)
@@ -693,28 +692,8 @@
 	unsigned long offset;
 
 	/* given image pathname, first do simple (and fast) file extension test */
-/*	if (path)
-		{
-		const gchar *ext;
-		gint match = FALSE;
-		gint i;
+	if (!filter_file_class(path, FORMAT_CLASS_RAWIMAGE)) return 0;
 
-		ext = strrchr(path, '.');
-		if (!ext) return FALSE;
-		
-		for (i = 0; raw_ext_list[i]; i++) 
-			{
-			if (strcasecmp(raw_ext_list[i], ext) == 0)
-				{
-				match = TRUE;
-				break;
-				}
-			}
-
-		if (!match) return FALSE;
-
-		}
-*/
 	try {
 		RawFile rf(fd);
 		if (debug) printf("%s: offset ", path);