Claw 1.7.0
Classes | Public Member Functions
claw::graphic::png Class Reference

A class for png pictures. More...

#include <png.hpp>

Inheritance diagram for claw::graphic::png:
claw::graphic::image

List of all members.

Classes

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

Public Member Functions

 png (unsigned int w, unsigned int h)
 Constructor. Creates an empty image.
 png (const image &that)
 Copy constructor.
 png (std::istream &f)
 Constructor. Load an image from a png file.
void save (std::ostream &os, const writer::options &opt=writer::options()) const
 Save the image.

Detailed Description

A class for png pictures.

Author:
Julien Jorge

Definition at line 47 of file png.hpp.


Constructor & Destructor Documentation

claw::graphic::png::png ( unsigned int  w,
unsigned int  h 
)

Constructor. Creates an empty image.

Parameters:
wImage's width.
hImage's height.
Precondition:
w > 0 and h > 0

Definition at line 39 of file png.cpp.

claw::graphic::png::png ( const image that)

Copy constructor.

Parameters:
thatImage to copy from.

Definition at line 50 of file png.cpp.

claw::graphic::png::png ( std::istream &  f)

Constructor. Load an image from a png file.

Parameters:
fPng file.

Definition at line 61 of file png.cpp.


Member Function Documentation

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

Save the image.

Parameters:
fThe file in which we write.
optSaving options.

Definition at line 73 of file png.cpp.

Referenced by claw::graphic::png::writer::writer().


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