Claw  1.7.3
Classes | Public Member Functions | List of all members
claw::graphic::png::writer Class Reference

This class write an image in a png file. More...

#include <png.hpp>

Classes

struct  options
 Parameters of the writing algorithm. More...
struct  target_manager
 Target manager that allow us to write in a std::ostream. More...

Public Member Functions

 writer (const image &img)
 Constructor.
 writer (const image &img, std::ostream &f, const options &opt=options())
 Constructor.
void save (std::ostream &f, const options &opt=options()) const
 Save the image in a PNG file.

Detailed Description

This class write an image in a png file.

Author
Julien Jorge

Definition at line 114 of file png.hpp.

Constructor & Destructor Documentation

claw::graphic::png::writer::writer ( const image img)

Constructor.

Parameters
imgThe image in which the data will be stored.

Definition at line 136 of file png_writer.cpp.

claw::graphic::png::writer::writer ( const image img,
std::ostream &  f,
const options opt = options() 
)

Constructor.

Parameters
imgThe image to save.
fThe file in which we write the data.
optSaving options.

Definition at line 150 of file png_writer.cpp.

References claw::graphic::png::save().

Member Function Documentation

void claw::graphic::png::writer::save ( std::ostream &  f,
const options opt = options() 
) const

Save the image in a PNG file.

Parameters
fPNG file.
optSaving options.

Definition at line 163 of file png_writer.cpp.

References claw__graphic__png__target_manager__flush(), claw__graphic__png__target_manager__write(), CLAW_EXCEPTION, and CLAW_PRECOND.


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