From: Niels K. B. J. <nk...@us...> - 2008-01-23 13:45:14
|
Update of /cvsroot/ufraw/ufraw In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv20356 Modified Files: configure.ac ufraw_exiv2.cc Log Message: More elegant solution to EXIF changes from Yesterday. Index: configure.ac =================================================================== RCS file: /cvsroot/ufraw/ufraw/configure.ac,v retrieving revision 1.108 retrieving revision 1.109 diff -u -d -r1.108 -r1.109 --- configure.ac 22 Jan 2008 18:50:11 -0000 1.108 +++ configure.ac 23 Jan 2008 13:45:09 -0000 1.109 @@ -181,7 +181,7 @@ # AC_CHECK_LIB(cfitsio, ffcmsg)) have_fits=${ac_cv_lib_cfitsio_ffcmsg:-no} -PKG_CHECK_MODULES(EXIV2, exiv2 >= 0.12, +PKG_CHECK_MODULES(EXIV2, exiv2 >= 0.11, [ have_exiv2=yes AC_DEFINE(HAVE_EXIV2, 1, have exiv2) ], [ have_exiv2=no Index: ufraw_exiv2.cc =================================================================== RCS file: /cvsroot/ufraw/ufraw/ufraw_exiv2.cc,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- ufraw_exiv2.cc 22 Jan 2008 19:10:11 -0000 1.28 +++ ufraw_exiv2.cc 23 Jan 2008 13:45:09 -0000 1.29 @@ -25,6 +25,12 @@ #include <sstream> #include <cassert> +// EXIV2_TEST_VERSION is defined in Exiv2 0.15 and newer. +#ifndef EXIV2_TEST_VERSION +# define EXIV2_TEST_VERSION(major,minor,patch) \ + ( EXIV2_VERSION >= EXIV2_MAKE_VERSION(major,minor,patch) ) +#endif + /* * Helper function to copy a string to a buffer, converting it from * current locale (in which exiv2 often returns strings) to UTF-8. @@ -246,16 +252,15 @@ /* Delete various MakerNote fields only applicable to the raw file */ -#ifdef EXIV2_TEST_VERSION -#if EXIV2_TEST_VERSION(0,15,0) // Nikon thumbnail data +#if EXIV2_TEST_VERSION(0,13,0) if ( (pos=exifData.findKey(Exiv2::ExifKey("Exif.Nikon3.Preview"))) != exifData.end() ) exifData.erase(pos); +#endif if ( (pos=exifData.findKey(Exiv2::ExifKey("Exif.Nikon3.NEFThumbnailSize"))) != exifData.end() ) exifData.erase(pos); -#endif #if EXIV2_TEST_VERSION(0,16,0) // Pentax thumbnail data @@ -269,7 +274,6 @@ != exifData.end() ) exifData.erase(pos); #endif -#endif // Minolta thumbnail data if ( (pos=exifData.findKey(Exiv2::ExifKey("Exif.Minolta.Thumbnail"))) @@ -282,8 +286,7 @@ != exifData.end() ) exifData.erase(pos); -#ifdef EXIV2_TEST_VERSION -#if EXIV2_TEST_VERSION(0,16,0) +#if EXIV2_TEST_VERSION(0,13,0) // Olympus thumbnail data if ( (pos=exifData.findKey(Exiv2::ExifKey("Exif.Olympus.Thumbnail"))) != exifData.end() ) @@ -295,18 +298,15 @@ != exifData.end() ) exifData.erase(pos); #endif -#endif /* Write appropriate color space tag if using sRGB output */ if (!strcmp(uf->developer->profileFile[out_profile], "")) exifData["Exif.Photo.ColorSpace"] = uint16_t(1); /* sRGB */ -#ifdef EXIV2_TEST_VERSION -#if EXIV2_TEST_VERSION(0,15,0) +#if EXIV2_TEST_VERSION(0,14,0) /* Add "UFRaw" and version used to output file as processing software. */ exifData["Exif.Image.ProcessingSoftware"] = "UFRaw " VERSION; #endif -#endif Exiv2::DataBuf buf(exifData.copy()); const unsigned char ExifHeader[] = {0x45, 0x78, 0x69, 0x66, 0x00, 0x00}; |