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. More...
| writer (const image &img, std::ostream &f, const options &opt=options())
| Constructor. More...
void | save (std::ostream &f, const options &opt=options()) const
| Save the image in a PNG file. More...

## Detailed Description

This class write an image in a png file.

Author
  Julien Jorge

Definition at line 115 of file png.hpp.

## Constructor & Destructor Documentation

## writer() [1/2]

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

Constructor.

Parameters

  img | The image in which the data will be stored.

Definition at line 136 of file png_writer.cpp.

## writer() [2/2]

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

Constructor.

Parameters

  img | The image to save.
  f | The file in which we write the data.
  opt | Saving options.

Definition at line 150 of file png_writer.cpp.

References save().

## Member Function Documentation

## save()

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

Save the image in a PNG file.

Parameters

  f | PNG file.
  opt | Saving 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, CLAW_PRECOND, claw::graphic::png::writer::options::compression, claw::graphic::image::height(), claw::graphic::png::writer::options::interlace, and claw::graphic::image::width().

Referenced by writer().

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

- png.hpp
- code/png_writer.cpp