Expand xmp builder
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "Math/Range.hpp"
|
||||
#include "Base/UUID.hpp"
|
||||
#include <filesystem>
|
||||
#include <fmt/chrono.h>
|
||||
|
||||
template<> struct fmt::formatter<OpenVulkano::ByteSize>
|
||||
{
|
||||
@@ -191,4 +192,4 @@ struct fmt::formatter<OpenVulkano::UUID> : fmt::formatter<std::string>
|
||||
{
|
||||
return fmt::format_to(ctx.out(), "{}", uuid.string());
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -94,6 +94,11 @@ namespace OpenVulkano::Image
|
||||
xmpData << fmt::format("<exif:ExposureTime>{0}</exif:ExposureTime><aux:ExposureTime>{0}</aux:ExposureTime>", exposureTime);
|
||||
return *this;
|
||||
}
|
||||
|
||||
[[maybe_unused]] XmpBuilder& XmpBuilder::SetCreateDate(const std::time_t time)
|
||||
{
|
||||
return SetCreateDate(fmt::format("{:%FT%T%Ez}", fmt::localtime(time)));
|
||||
}
|
||||
|
||||
[[maybe_unused]] XmpBuilder& XmpBuilder::SetCreateDate(const std::string& createDate)
|
||||
{
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace OpenVulkano::Image
|
||||
|
||||
[[maybe_unused]] XmpBuilder& SetFocalLength(float focalLengthMM);
|
||||
[[maybe_unused]] XmpBuilder& SetExposureTime(double exposureTime);
|
||||
[[maybe_unused]] XmpBuilder& SetCreateDate(const std::time_t time);
|
||||
[[maybe_unused]] XmpBuilder& SetCreateDate(const std::string& createDate);
|
||||
|
||||
[[maybe_unused]] std::string Close() { return Finalize(); }
|
||||
|
||||
Reference in New Issue
Block a user