[Rawstudio-commit] r1891 - trunk/src

Anders Brander anders at brander.dk
Tue Jul 22 04:00:41 CEST 2008


Author: abrander
Date: 2008-07-22 04:00:41 +0200 (Tue, 22 Jul 2008)
New Revision: 1891

Modified:
   trunk/src/ciff-meta.c
   trunk/src/rawstudio.c
   trunk/src/rawstudio.h
   trunk/src/tiff-meta.c
Log:
Added unix timestamp to RS_METADATA.

Modified: trunk/src/ciff-meta.c
===================================================================
--- trunk/src/ciff-meta.c	2008-07-22 01:55:20 UTC (rev 1890)
+++ trunk/src/ciff-meta.c	2008-07-22 02:00:41 UTC (rev 1891)
@@ -126,6 +126,7 @@
 				{
 					raw_get_uint(rawfile, absoffset, &uint_temp1);
 					meta->time_ascii = rs_unixtime_to_exiftime(uint_temp1);
+					meta->timestamp = (GTime) uint_temp1;
 				}
 				break;
 			case 0x10a9: /* white balance for D60, 10D, 300D */

Modified: trunk/src/rawstudio.c
===================================================================
--- trunk/src/rawstudio.c	2008-07-22 01:55:20 UTC (rev 1890)
+++ trunk/src/rawstudio.c	2008-07-22 02:00:41 UTC (rev 1891)
@@ -430,6 +430,7 @@
 	metadata->make_ascii = NULL;
 	metadata->model_ascii = NULL;
 	metadata->time_ascii = NULL;
+	metadata->timestamp = -1;
 	metadata->orientation = 0;
 	metadata->aperture = -1.0;
 	metadata->iso = 0;

Modified: trunk/src/rawstudio.h
===================================================================
--- trunk/src/rawstudio.h	2008-07-22 01:55:20 UTC (rev 1890)
+++ trunk/src/rawstudio.h	2008-07-22 02:00:41 UTC (rev 1891)
@@ -187,6 +187,7 @@
 	gchar *make_ascii;
 	gchar *model_ascii;
 	gchar *time_ascii;
+	GTime timestamp;
 	gushort orientation;
 	gfloat aperture;
 	gushort iso;

Modified: trunk/src/tiff-meta.c
===================================================================
--- trunk/src/tiff-meta.c	2008-07-22 01:55:20 UTC (rev 1890)
+++ trunk/src/tiff-meta.c	2008-07-22 02:00:41 UTC (rev 1891)
@@ -25,6 +25,7 @@
 #include "adobe-coeff.h"
 #include "rs-image.h"
 #include "rs-color-transform.h"
+#include "rs-utils.h"
 
 /* It is required having some arbitrary maximum exposure time to prevent borked
  * shutter speed values being interpreted from the tiff.
@@ -709,7 +710,10 @@
 			case 0x9003: /* DateTime */
 			case 0x9004: /* DateTime */
 				if (!meta->time_ascii)
+				{
 					meta->time_ascii = raw_strdup(rawfile, ifd.value_offset, ifd.count);
+					meta->timestamp = rs_exiftime_to_unixtime(meta->time_ascii);
+				}
 				break;
 			case 0x829A: /* ExposureTime */
 				if (ifd.count == 1 && ifd.value_rational < EXPO_TIME_MAXVAL)




More information about the Rawstudio-commit mailing list