#1148 Fixed Todo: Should use XMP packet if there are no XMP modification commands

v0.27.3
Robin Mills 10 years ago
parent 178d0f5fc6
commit a489e1cea7

@ -1963,9 +1963,19 @@ namespace {
std::cout << _("Writing XMP data from") << " " << source
<< " " << _("to") << " " << target << std::endl;
}
// Todo: Should use XMP packet if there are no XMP modification commands
// #1148 use XMP packet if there are no XMP modification commands
if ( Params::instance().modifyCmds_.size() == 0 ) {
// http://www.cplusplus.com/reference/ostream/ostream/ostream/
std::filebuf fb;
fb.open (target,std::ios::out);
std::ostream os(&fb);
sourceImage->printStructure(os,Exiv2::kpsXMP);
fb.close();
return 0;
} else {
targetImage->setXmpData(sourceImage->xmpData());
}
}
if ( Params::instance().target_ & Params::ctComment
&& !sourceImage->comment().empty()) {
if (Params::instance().verbose_) {

Loading…
Cancel
Save