claw::graphic::png::reader Class Reference

This class read data from a png file and store it in an image. More...

`#include <png.hpp>`

## Classes

struct | source_manager
| Source manager that allow us to read from a std::istream. More...

## Public Member Functions

| reader (image &img)
| Constructor. More...
| reader (image &img, std::istream &f)
| Constructor. More...
void | load (std::istream &f)
| Load an image from a png file. More...

## Detailed Description

This class read data from a png file and store it in an image.

Author
  Julien Jorge

Definition at line 56 of file png.hpp.

## Constructor & Destructor Documentation

## reader() [1/2]

claw::graphic::png::reader::reader | ( | image & | img | ) |

Constructor.

Parameters

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

Definition at line 90 of file png_reader.cpp.

## reader() [2/2]

claw::graphic::png::reader::reader | ( | image & | img,
|  | std::istream & | f
| ) |  |

Constructor.

Parameters

  img | The image in which the data will be stored.
  f | The file from which we read the data.

Postcondition
  img contains the data from f.

Definition at line 103 of file png_reader.cpp.

References load().

## Member Function Documentation

## load()

void claw::graphic::png::reader::load | ( | std::istream & | f | ) |

Load an image from a png file.

Parameters

  f | PNG file.

Definition at line 114 of file png_reader.cpp.

References claw__graphic__png__source_manager__read(), CLAW_EXCEPTION, CLAW_PRECOND, claw::graphic::image::height(), claw::graphic::image::set_size(), and claw::graphic::image::width().

Referenced by reader().

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

- png.hpp
- code/png_reader.cpp