46 [[nodiscard]]
virtual bool can_write(
const std::string& filepath)
const = 0;
56 const std::string& filepath,
virtual ~ImageWriter()=default
virtual std::string get_last_error() const =0
Last error message or empty string.
virtual bool write(const std::string &filepath, const ImageData &data, const ImageWriteOptions &options={})=0
Write image data to disk.
virtual bool can_write(const std::string &filepath) const =0
Check whether this writer handles the given filepath.
virtual std::vector< std::string > get_supported_extensions() const =0
File extensions handled by this writer (without dot).
Abstract base for image format writers.
Singleton registry dispatching single-shot writes by file extension.
std::function< std::unique_ptr< Writer >()> WriterFactory
WriterFactory< ImageWriter > ImageWriterFactory
std::vector< std::string > channel_names
Configuration for image writing.
Raw image data loaded from file or read back from a GPU image.