PNG writer class template. This is the low-level writing interface--use image class or generator class to actually write images. More...
#include <writer.hpp>
Public Member Functions | |
writer (ostream &stream) | |
Constructs a writer prepared to write PNG image into a stream. | |
~writer () | |
void | write_png () const |
void | write_info () const |
Write info about PNG image. | |
void | write_row (byte *bytes) |
Writes a row of image data at a time. | |
void | write_end_info () const |
Reads ending info about PNG image. |
PNG writer class template. This is the low-level writing interface--use image class or generator class to actually write images.
The ostream
template parameter specifies the type of output stream to work with. The ostream
class should implement the minimum of the following interface:
class my_ostream { public: void write(char const*, size_t); void flush(); bool good(); };
With the semantics similar to the std::ostream
. Naturally, std::ostream
fits this requirement and can be used with the writer class as is.
png::writer< ostream >::writer | ( | ostream & | stream | ) | [inline, explicit] |
Constructs a writer prepared to write PNG image into a stream.
References png::io_base::m_png.
png::writer< ostream >::~writer | ( | ) | [inline] |
void png::writer< ostream >::write_png | ( | ) | const [inline] |
void png::writer< ostream >::write_info | ( | ) | const [inline] |
Write info about PNG image.
References png::io_base::m_error, png::io_base::m_info, png::io_base::m_png, and png::info::write().
Referenced by png::generator< pixel, pixel_generator, image_info_ref_holder, true >::write().
void png::writer< ostream >::write_row | ( | byte * | bytes | ) | [inline] |
Writes a row of image data at a time.
References png::io_base::m_error, and png::io_base::m_png.
Referenced by png::generator< pixel, pixel_generator, image_info_ref_holder, true >::write().
void png::writer< ostream >::write_end_info | ( | ) | const [inline] |
Reads ending info about PNG image.
References png::io_base::m_end_info, png::io_base::m_error, png::io_base::m_png, and png::end_info::write().
Referenced by png::generator< pixel, pixel_generator, image_info_ref_holder, true >::write().