#pragma once #include "image_writer.h" #include #include "lib_begin.h" namespace cgv { namespace media { namespace image { /// implements the image writer interface for bmp files class CGV_API bmp_writer : public abst_image_writer { protected: std::string last_error; FILE* fp; public: /// default constructor bmp_writer(); /// overload to return the type name of this object std::string get_type_name() const; /// construct a copy of the reader abst_image_writer* clone() const; /// return a string containing a colon separated list of extensions that can be read with this reader const char* get_supported_extensions() const; /// check if the chosen writer supports the given component format bool is_format_supported(const component_format& cf, const std::vector* palette_formats) const; /// return a colon separated list of supported options std::string get_options() const; /// return a reference to the last error message const std::string& get_last_error() const; /// open image file to write bool open(const std::string& file_name); /** write the data stored in the data view to a file with the file name given in the constructor. */ bool write_image(const const_data_view& dv, const std::vector* palettes, double duration); /// close image [stream] bool close(); }; } } } #include