Merge pull request #6988 from sgotti/add_optional_thumbnail_rank_color_load_save_from_to_xmp_sidecar

Add optional image rank/color load/save from/to xmp sidecar
This commit is contained in:
Lawrence37
2024-05-11 21:45:00 -07:00
committed by GitHub
11 changed files with 259 additions and 78 deletions

View File

@@ -106,19 +106,6 @@ void clear_metadata_key(Data &data, const Key &key)
}
}
template <typename Iterator, typename Integer = std::size_t>
auto to_long(const Iterator &iter, Integer n = Integer{0}) -> decltype(
#if EXIV2_TEST_VERSION(0,28,0)
iter->toInt64()
) {
return iter->toInt64(n);
#else
iter->toLong()
) {
return iter->toLong(n);
#endif
}
} // namespace

View File

@@ -97,4 +97,18 @@ private:
static std::unique_ptr<ImageCache> cache_;
};
template <typename Iterator, typename Integer = std::size_t>
auto to_long(const Iterator &iter, Integer n = Integer{0}) -> decltype(
#if EXIV2_TEST_VERSION(0,28,0)
iter->toInt64()
) {
return iter->toInt64(n);
#else
iter->toLong()
) {
return iter->toLong(n);
#endif
}
} // namespace rtengine