Commit 861fb2f3 authored by Michael J. Chudobiak's avatar Michael J. Chudobiak Committed by Michael J. Chudobiak

Make exiv2 mandatory, 0.15 or higher. Check for version 0.16, which has

2008-01-11  Michael J. Chudobiak  <mjc@svn.gnome.org>

        * NEWS:
        * README:
        * configure.in:
        * libgthumb/gth-exiv2-utils.cpp:
        Make exiv2 mandatory, 0.15 or higher. Check for version 0.16,
        which has XMP support.


svn path=/trunk/; revision=2180
parent 96526721
2008-01-11 Michael J. Chudobiak <mjc@svn.gnome.org>
* NEWS:
* README:
* configure.in:
* libgthumb/gth-exiv2-utils.cpp:
Make exiv2 mandatory, 0.15 or higher. Check for version 0.16,
which has XMP support.
2008-01-11 Michael J. Chudobiak <mjc@svn.gnome.org>
* AUTHORS:
......
......@@ -56,6 +56,9 @@ trunk, since last 2.10.x
* Added strftime format codes to the scripting feature.
* Initial support for the exiv2 metadata-reading library.
Library changes:
* exiv2 0.15 or higher is now required.
version 2.10.8
--------------
......
......@@ -94,6 +94,7 @@ Compiling
* libglade version >= 2.4.0
* intltool version >= 0.35.0
* libexif version >= 0.6.13
* exiv2 version >= 0.15
* libjpeg
* gtkunique version >= 0.9.1 (optional)
......@@ -112,6 +113,8 @@ Compiling
If dcraw is present (and is in your executable search path),
gthumb can view full RAW photos.
If exiv2 version 0.16 or higher is present, you can read XMP metadata.
If pfstools and pfstmo are installed, gthumb can view HDR images.
See http://www.mpi-inf.mpg.de/resources/pfstools.
To view OpenEXR files with pfstools, the OpenEXR libraries need
......
......@@ -35,7 +35,7 @@ LIBIPTCDATA_REQUIRED=0.2.1
LIBGPHOTO_REQUIRED=2.1.3
BONOBO_REQUIRED=2.6.0
LIBOPENRAW_REQUIRED=0.0.2
EXIV2_REQUIRED=0.16
EXIV2_REQUIRED=0.15
GSTREAMER_REQUIRED=0.10.0
AC_SUBST(GLIB_REQUIRED)
......@@ -72,6 +72,7 @@ PKG_CHECK_MODULES(GTHUMB, \
gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED \
gnome-vfs-module-2.0 \
libexif >= $LIBEXIF_REQUIRED \
exiv2 >= $EXIV2_REQUIRED \
libxml-2.0 >= $LIBXML_REQUIRED \
libglade-2.0 >= $LIBGLADE_REQUIRED)
AC_SUBST(GTHUMB_LIBS)
......@@ -247,18 +248,11 @@ fi
#
# check for exiv2
# check for exiv2 xmp functionality
#
AC_ARG_ENABLE([exiv2],
[AC_HELP_STRING([--disable-exiv2], [Disable exiv2 metadata extraction])],,
[enable_exiv2=yes])
HAVE_EXIV2=no
if test "x$enable_exiv2" = "xyes"; then
PKG_CHECK_MODULES(EXIV2, exiv2 >= $EXIV2_REQUIRED,
[AC_DEFINE(HAVE_EXIV2, 1, [Define to 1 to enable exiv2 support])
HAVE_EXIV2=yes],
[HAVE_EXIV2=no])
fi
AC_LANG_PUSH([C++])
AC_CHECK_HEADERS([exiv2/xmp.hpp],[HAVE_XMP=yes],[HAVE_XMP=no])
AC_LANG_POP([C++])
#
......@@ -399,7 +393,7 @@ Configuration:
Have libtiff: ${HAVE_TIFF}
Have libgphoto: ${HAVE_GPHOTO2}
Have libopenraw: ${HAVE_LIBOPENRAW}
Have exiv2: ${HAVE_EXIV2}
Have exiv2 xmp support: ${HAVE_XMP}
Have gstreamer: ${HAVE_GSTREAMER}
"
......@@ -23,7 +23,6 @@
#include "gth-exiv2-utils.hpp"
#include <exiv2/basicio.hpp>
#include <exiv2/xmp.hpp>
#include <exiv2/error.hpp>
#include <exiv2/image.hpp>
#include <exiv2/exif.hpp>
......@@ -33,6 +32,9 @@
#include <vector>
#include <iomanip>
#ifdef HAVE_XMP
#include <exiv2/xmp.hpp>
#endif
using namespace std;
......@@ -152,6 +154,7 @@ read_exiv2_file (const char *uri, GList *metadata)
}
}
#ifdef HAVE_XMP
Exiv2::XmpData &xmpData = image->xmpData();
if (!xmpData.empty()) {
......@@ -173,6 +176,7 @@ read_exiv2_file (const char *uri, GList *metadata)
metadata = add (metadata, name.str().c_str(), value.str().c_str(), cat);
}
}
#endif
return metadata;
}
......@@ -188,6 +192,7 @@ GList *
read_exiv2_sidecar (const char *uri, GList *metadata)
{
try {
#ifdef HAVE_XMP
Exiv2::DataBuf buf = Exiv2::readFile(uri);
std::string xmpPacket;
xmpPacket.assign(reinterpret_cast<char*>(buf.pData_), buf.size_);
......@@ -217,6 +222,7 @@ read_exiv2_sidecar (const char *uri, GList *metadata)
}
}
Exiv2::XmpParser::terminate();
#endif
return metadata;
}
catch (Exiv2::AnyError& e) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment