[Rawstudio-commit] r2997 - branches/rawstudio-ng-color/librawstudio

Anders Kvist anders at kvistmail.dk
Sat Jan 16 01:18:59 CET 2010


Author: akv
Date: 2010-01-16 01:18:58 +0100 (Sat, 16 Jan 2010)
New Revision: 2997

Modified:
   branches/rawstudio-ng-color/librawstudio/rs-metadata.c
   branches/rawstudio-ng-color/librawstudio/rs-metadata.h
Log:
Added lens_id (not identifier) to RSMetadata.

Modified: branches/rawstudio-ng-color/librawstudio/rs-metadata.c
===================================================================
--- branches/rawstudio-ng-color/librawstudio/rs-metadata.c	2010-01-14 23:54:24 UTC (rev 2996)
+++ branches/rawstudio-ng-color/librawstudio/rs-metadata.c	2010-01-16 00:18:58 UTC (rev 2997)
@@ -98,6 +98,7 @@
 	metadata->thumbnail = NULL;
 
 	/* Lens info */
+	metadata->lens_id = -1.0;
 	metadata->lens_min_focal = -1.0;
 	metadata->lens_max_focal = -1.0;
 	metadata->lens_min_aperture = -1.0;
@@ -164,6 +165,8 @@
 			xmlTextWriterWriteFormatElement(writer, BAD_CAST "color_tone", "%f", metadata->color_tone);
 		if (metadata->focallength > 0)
 			xmlTextWriterWriteFormatElement(writer, BAD_CAST "focallength", "%d", metadata->focallength);
+		if (metadata->lens_id > -1.0)
+			xmlTextWriterWriteFormatElement(writer, BAD_CAST "lens_id", "%f", metadata->lens_id);
 		if (metadata->lens_min_focal > -1.0)
 			xmlTextWriterWriteFormatElement(writer, BAD_CAST "lens_min_focal", "%f", metadata->lens_min_focal);
 		if (metadata->lens_max_focal > -1.0)
@@ -334,6 +337,12 @@
 				metadata->focallength = atoi((gchar *) val);
 				xmlFree(val);
 			}
+			else if ((!xmlStrcmp(cur->name, BAD_CAST "lens_id")))
+			{
+				val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
+				metadata->lens_id = atoi((gchar *) val);
+				xmlFree(val);
+			}
 			else if ((!xmlStrcmp(cur->name, BAD_CAST "lens_min_focal")))
 			{
 				val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);

Modified: branches/rawstudio-ng-color/librawstudio/rs-metadata.h
===================================================================
--- branches/rawstudio-ng-color/librawstudio/rs-metadata.h	2010-01-14 23:54:24 UTC (rev 2996)
+++ branches/rawstudio-ng-color/librawstudio/rs-metadata.h	2010-01-16 00:18:58 UTC (rev 2997)
@@ -82,6 +82,7 @@
 	GdkPixbuf *thumbnail;
 
 	/* Lens info */
+	gdouble lens_id;
 	gdouble lens_min_focal;
 	gdouble lens_max_focal;
 	gdouble lens_min_aperture;




More information about the Rawstudio-commit mailing list