diff src/thumb.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.c	Fri Feb 06 23:49:03 2009 +0000
+++ b/src/thumb.c	Sat Feb 07 19:01:21 2009 +0000
@@ -21,6 +21,7 @@
 #include "thumb_standard.h"
 #include "ui_fileops.h"
 #include "exif.h"
+#include "metadata.h"
 
 #include <utime.h>
 
@@ -141,14 +142,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)