| 884 | } |
| 885 | |
| 886 | void Converter::cnvXmpArray(const char* from, const char* to) { |
| 887 | if (!prepareExifTarget(to)) |
| 888 | return; |
| 889 | auto pos = xmpData_->findKey(XmpKey(from)); |
| 890 | if (pos == xmpData_->end()) |
| 891 | return; |
| 892 | std::ostringstream array; |
| 893 | for (size_t i = 0; i < pos->count(); ++i) { |
| 894 | std::string value = pos->toString(i); |
| 895 | if (!pos->value().ok()) { |
| 896 | #ifndef SUPPRESS_WARNINGS |
| 897 | EXV_WARNING << "Failed to convert " << from << " to " << to << "\n"; |
| 898 | #endif |
| 899 | return; |
| 900 | } |
| 901 | array << value; |
| 902 | if (i != pos->count() - 1) |
| 903 | array << " "; |
| 904 | } |
| 905 | (*exifData_)[to] = array.str(); |
| 906 | if (erase_) |
| 907 | xmpData_->erase(pos); |
| 908 | } |
| 909 | |
| 910 | void Converter::cnvXmpDate(const char* from, const char* to) { |
| 911 | auto pos = xmpData_->findKey(XmpKey(from)); |