changeset 452:0a69a779395a

fixed color profile code for older versions of exiv2 compilation fixes
author nadvornik
date Sun, 20 Apr 2008 22:14:38 +0000
parents 1755b6c14d2b
children 08978246acef
files src/exiv2.cc
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/exiv2.cc	Sun Apr 20 22:01:26 2008 +0000
+++ b/src/exiv2.cc	Sun Apr 20 22:14:38 2008 +0000
@@ -80,6 +80,8 @@
 			if (debug >= 2) printf("sidecar xmp count %li\n", sidecar->xmpData().count());
 			}
 
+#endif
+#if EXIV2_TEST_VERSION(0,14,0)
 		if (image->mimeType() == std::string("image/jpeg"))
 			{
 			/* try to get jpeg color profile */
@@ -91,9 +93,7 @@
 			io.munmap();
 			if (!open) io.close();
 			}
-		
-		
-#endif
+#endif		
 	}
 	
 	~_ExifData()
@@ -164,7 +164,7 @@
 ExifItem *exif_get_item(ExifData *exif, const gchar *key)
 {
 	try {
-		Exiv2::Metadatum *item;
+		Exiv2::Metadatum *item = NULL;
 		try {
 			Exiv2::ExifKey ekey(key);
 			Exiv2::ExifData::iterator pos = exif->exifData().findKey(ekey);
@@ -198,7 +198,7 @@
 ExifItem *exif_add_item(ExifData *exif, const gchar *key)
 {
 	try {
-		Exiv2::Metadatum *item;
+		Exiv2::Metadatum *item = NULL;
 		try {
 			Exiv2::ExifKey ekey(key);
 			exif->exifData().add(ekey, NULL);