[tracker/libtracker-extract-fixes: 9/10] Bug NB#161047 - Images resolution is not extracted.
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/libtracker-extract-fixes: 9/10] Bug NB#161047 - Images resolution is not extracted.
- Date: Tue, 13 Apr 2010 13:14:45 +0000 (UTC)
commit 9f73f845259a55f0add31ac50a1b9f5f7719d9ed
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Apr 8 14:03:47 2010 +0200
Bug NB#161047 - Images resolution is not extracted.
Tracker-extract: Add X/Y resolution to JPEG extractor.
src/tracker-extract/tracker-extract-jpeg.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-jpeg.c b/src/tracker-extract/tracker-extract-jpeg.c
index ee70e65..2debe8e 100644
--- a/src/tracker-extract/tracker-extract-jpeg.c
+++ b/src/tracker-extract/tracker-extract-jpeg.c
@@ -619,6 +619,24 @@ extract_jpeg (const gchar *uri,
tracker_sparql_builder_object_blank_close (metadata);
}
+ if (ed->x_resolution) {
+ gdouble value;
+
+ value = g_strtod (ed->x_resolution, NULL);
+ tracker_sparql_builder_predicate (metadata, "nfo:horizontalResolution");
+ tracker_sparql_builder_object_int64 (metadata, (gint64) value);
+ g_free (ed->x_resolution);
+ }
+
+ if (ed->y_resolution) {
+ gdouble value;
+
+ value = g_strtod (ed->y_resolution, NULL);
+ tracker_sparql_builder_predicate (metadata, "nfo:verticalResolution");
+ tracker_sparql_builder_object_int64 (metadata, (gint64) value);
+ g_free (ed->y_resolution);
+ }
+
jpeg_destroy_decompress (&cinfo);
tracker_exif_free (ed, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]