[Tracker] [PATCH] extractor-jpeg: fix original resolution conversion
- From: lionel g landwerlin linux intel com
 
- To: tracker-list gnome org
 
- Subject: [Tracker] [PATCH] extractor-jpeg: fix original resolution conversion
 
- Date: Sat, 19 Mar 2011 02:20:25 +0000
 
From: Lionel Landwerlin <lionel g landwerlin linux intel com>
According to the specification (http://www.exif.org/Exif2-2.PDF),
the resolution unit is described as :
 2     = inches unit
 3     = centimer unit
 other = reserved
Signed-off-by: Lionel Landwerlin <lionel g landwerlin linux intel com>
---
 src/tracker-extract/tracker-extract-jpeg.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/tracker-extract/tracker-extract-jpeg.c b/src/tracker-extract/tracker-extract-jpeg.c
index fadfeb5..7b67ed9 100644
--- a/src/tracker-extract/tracker-extract-jpeg.c
+++ b/src/tracker-extract/tracker-extract-jpeg.c
@@ -586,8 +586,8 @@ extract_jpeg (const gchar          *uri,
        if (cinfo.density_unit != 0 || ed->x_resolution) {
                gdouble value;
 
-               if (cinfo.density_unit == 0) {
-                       if (ed->resolution_unit == 1)
+                if (cinfo.density_unit == 0) {
+                       if (ed->resolution_unit != 3)
                                value = g_strtod (ed->x_resolution, NULL);
                        else
                                value = g_strtod (ed->x_resolution, NULL) * CM_TO_INCH;
@@ -606,7 +606,7 @@ extract_jpeg (const gchar          *uri,
                gdouble value;
 
                if (cinfo.density_unit == 0) {
-                       if (ed->resolution_unit == 1)
+                       if (ed->resolution_unit != 3)
                                value = g_strtod (ed->y_resolution, NULL);
                        else
                                value = g_strtod (ed->y_resolution, NULL) * CM_TO_INCH;
-- 
1.7.4.1
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]