=== modified file 'src/libpyexiv2.cpp' --- src/libpyexiv2.cpp 2009-03-14 21:43:49 +0000 +++ src/libpyexiv2.cpp 2009-07-20 14:38:16 +0000 @@ -74,6 +74,13 @@ throw Exiv2::Error(METADATA_NOT_READ); } + void Image::copyMetadataTo(Image & image) + { + image._exifData = _exifData; + image._iptcData = _iptcData; + image.setComment(getComment()); + } + boost::python::list Image::exifKeys() { boost::python::list list; === modified file 'src/libpyexiv2.hpp' --- src/libpyexiv2.hpp 2009-03-14 21:43:49 +0000 +++ src/libpyexiv2.hpp 2009-07-20 14:38:09 +0000 @@ -47,6 +47,7 @@ void readMetadata(); void writeMetadata(); + void copyMetadataTo(Image& image); // Read and write access to the EXIF tags. // For a complete list of the available EXIF tags, see === modified file 'src/libpyexiv2_wrapper.cpp' --- src/libpyexiv2_wrapper.cpp 2008-02-09 01:14:45 +0000 +++ src/libpyexiv2_wrapper.cpp 2009-07-20 14:38:57 +0000 @@ -42,6 +42,7 @@ .def("readMetadata", &Image::readMetadata) .def("writeMetadata", &Image::writeMetadata) + .def("copyMetadataTo", &Image::copyMetadataTo) .def("exifKeys", &Image::exifKeys) .def("_Image__getExifTag", &Image::getExifTag) === modified file 'src/pyexiv2.py' --- src/pyexiv2.py 2009-03-14 21:43:49 +0000 +++ src/pyexiv2.py 2009-07-20 14:35:10 +0000 @@ -734,19 +734,3 @@ """ # This method was added as a requirement tracked by bug #147534 return self.__getExifTagToString(key) - - def copyMetadataTo(self, destImage): - """ - Duplicate all the tags and the comment from this image to another one. - - Read all the values of the EXIF and IPTC tags and the comment and write - them back to the new image. - - Keyword arguments: - destImage -- the destination image to write the copied metadata back to - """ - for key in self.exifKeys(): - destImage[key] = self[key] - for key in self.iptcKeys(): - destImage[key] = self[key] - destImage.setComment(self.getComment())