png.cpp
Go to the documentation of this file.
/*
CLAW - a C++ Library Absolutely Wonderful
CLAW is a free library without any particular aim but being useful to
anyone.
Copyright (C) 2005-2011 Julien Jorge
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
contact: julien.jorge@gamned.org
*/
#include <claw/png.hpp>
/*----------------------------------------------------------------------------*/
claw::graphic::png::png( unsigned int w, unsigned int h )
: image(w, h)
{
} // png::png() [constructor]
/*----------------------------------------------------------------------------*/
claw::graphic::png::png( const image& that )
: image(that)
{
} // png::png() [copy constructor]
/*----------------------------------------------------------------------------*/
claw::graphic::png::png( std::istream& f )
{
reader(*this, f);
} // png::png() [constructor, from file]
/*----------------------------------------------------------------------------*/
void
claw::graphic::png::save( std::ostream& f, const writer::options& opt ) const
{
writer( *this, f, opt );
} // png::save()
claw::graphic::png::reader
This class read data from a png file and store it in an image.
Definition: png.hpp:56
claw::graphic::png::save
void save(std::ostream &os, const writer::options &opt=writer::options()) const
Save the image.
Definition: png.cpp:73
png.hpp
A class for png pictures.
claw::graphic::png::writer
This class write an image in a png file.
Definition: png.hpp:115
claw::graphic::image
A class to deal with images.
Definition: image.hpp:49
claw::graphic::png::writer::options
Parameters of the writing algorithm.
Definition: png.hpp:121
claw::graphic::png::png
png(unsigned int w, unsigned int h)
Constructor. Creates an empty image.
Definition: png.cpp:39