diff src/thumb_standard.c @ 1288:10073464e6aa

use metadata_read_* functions where possible switch exiv2 to utf8 charset support for exiv2 formatting that depends on other tags: http://dev.robotbattle.com/bugs/view.php?id=0000516
author nadvornik
date Sat, 07 Feb 2009 19:01:21 +0000
parents 8b89e3ff286b
children c9949c19a6d0
line wrap: on
line diff
--- a/src/thumb_standard.c	Fri Feb 06 23:49:03 2009 +0000
+++ b/src/thumb_standard.c	Sat Feb 07 19:01:21 2009 +0000
@@ -20,6 +20,7 @@
 #include "ui_fileops.h"
 #include "filedata.h"
 #include "exif.h"
+#include "metadata.h"
 
 
 /*
@@ -394,14 +395,7 @@
 		{
 		if (!tl->fd->exif_orientation)
 			{
-			ExifData *exif = exif_read_fd(tl->fd);
-			gint orientation;
-
-			if (exif && exif_get_integer(exif, "Exif.Image.Orientation", &orientation))
-				tl->fd->exif_orientation = orientation;
-			else
-				tl->fd->exif_orientation = EXIF_ORIENTATION_TOP_LEFT;
-			exif_free_fd(tl->fd, exif);
+			tl->fd->exif_orientation = metadata_read_int(tl->fd, "Exif.Image.Orientation", EXIF_ORIENTATION_TOP_LEFT);
 			}
 		
 		if (tl->fd->exif_orientation != EXIF_ORIENTATION_TOP_LEFT)