aboutsummaryrefslogtreecommitdiffstats
path: root/src/libpyexiv2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libpyexiv2.cpp')
-rw-r--r--src/libpyexiv2.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/libpyexiv2.cpp b/src/libpyexiv2.cpp
index f77b6c7..6eebbdd 100644
--- a/src/libpyexiv2.cpp
+++ b/src/libpyexiv2.cpp
@@ -88,6 +88,18 @@ namespace LibPyExiv2
throw Exiv2::Error(METADATA_NOT_READ);
}
+ bool Image::isExifTagSet(std::string key)
+ {
+ if(_dataRead)
+ {
+ Exiv2::ExifKey exifKey = Exiv2::ExifKey(key);
+ Exiv2::ExifMetadata::iterator i = _exifData.findKey(exifKey);
+ return (i != _exifData.end());
+ }
+ else
+ throw Exiv2::Error(METADATA_NOT_READ);
+ }
+
boost::python::tuple Image::getExifTag(std::string key)
{
if(_dataRead)
@@ -192,6 +204,18 @@ namespace LibPyExiv2
throw Exiv2::Error(METADATA_NOT_READ);
}
+ bool Image::isIptcTagSet(std::string key)
+ {
+ if(_dataRead)
+ {
+ Exiv2::IptcKey iptcKey = Exiv2::IptcKey(key);
+ Exiv2::IptcMetadata::iterator i = _iptcData.findKey(iptcKey);
+ return (i != _iptcData.end());
+ }
+ else
+ throw Exiv2::Error(METADATA_NOT_READ);
+ }
+
boost::python::tuple Image::getIptcTag(std::string key)
{
if(_dataRead)