diff options
author | Olivier Tilloy <olivier@tilloy.net> | 2010-01-22 21:00:13 +0100 |
---|---|---|
committer | Olivier Tilloy <olivier@tilloy.net> | 2010-01-22 21:00:13 +0100 |
commit | 24b9261f486f68db6166a28f07af510a6830d17b (patch) | |
tree | 2458966c5f4ee43c44705a7a0783ecd13ec7b80c /src/exiv2wrapper.cpp | |
parent | bdd8941477e703ccd0240c68767c972f7d81afbe (diff) | |
download | pyexiv2-24b9261f486f68db6166a28f07af510a6830d17b.tar.gz |
Copy metadata to another image.
From an original patch by Ilpo Nyyssönen (http://iny.iki.fi/).
Diffstat (limited to 'src/exiv2wrapper.cpp')
-rw-r--r-- | src/exiv2wrapper.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/exiv2wrapper.cpp b/src/exiv2wrapper.cpp index b6c85cf..ab52892 100644 --- a/src/exiv2wrapper.cpp +++ b/src/exiv2wrapper.cpp @@ -404,6 +404,19 @@ boost::python::list Image::previews() return previews; } +void Image::copyMetadata(Image& other, bool exif, bool iptc, bool xmp) const +{ + CHECK_METADATA_READ + if (!other._dataRead) throw Exiv2::Error(METADATA_NOT_READ); + + if (exif) + other._exifData = _exifData; + if (iptc) + other._iptcData = _iptcData; + if (xmp) + other._xmpData = _xmpData; +} + ExifTag::ExifTag(const std::string& key, Exiv2::Exifdatum* datum, Exiv2::ExifData* data): _key(key) { |