Public Member Functions

png::writer< ostream > Class Template Reference

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>

Inheritance diagram for png::writer< ostream >:
png::io_base

List of all members.

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.

Detailed Description

template<class ostream>
class png::writer< ostream >

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.

See also:
image, reader, generator, io_base

Constructor & Destructor Documentation

template<class ostream>
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.


Member Function Documentation

template<class ostream>
void png::writer< ostream >::write_png (  )  const [inline]
template<class ostream>
void png::writer< ostream >::write_info (  )  const [inline]
template<class ostream>
void png::writer< ostream >::write_row ( byte bytes  )  [inline]
template<class ostream>
void png::writer< ostream >::write_end_info (  )  const [inline]

The documentation for this class was generated from the following file: