#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. |
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] |
png::writer< ostream >::~writer | ( | ) | [inline] |
void png::writer< ostream >::write_png | ( | ) | const [inline] |
void png::writer< ostream >::write_info | ( | ) | const [inline] |
void png::writer< ostream >::write_row | ( | byte * | bytes | ) | [inline] |
Writes a row of image data at a time.
void png::writer< ostream >::write_end_info | ( | ) | const [inline] |