Classes | Public Member Functions

claw::graphic::jpeg Class Reference

A class for jpeg pictures. More...

#include <jpeg.hpp>

Inheritance diagram for claw::graphic::jpeg:
claw::graphic::image

List of all members.

Classes

struct  error_manager
 Error handler that throw an exception instead of exiting the program. More...
class  reader
 This class read data from a jpeg file and store it in an image. More...
class  writer
 This class write an image in a jpeg file. More...

Public Member Functions

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

Detailed Description

A class for jpeg pictures.

Author:
Julien Jorge

Definition at line 51 of file jpeg.hpp.


Constructor & Destructor Documentation

claw::graphic::jpeg::jpeg ( 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 jpeg.cpp.

  : claw::graphic::image(w, h)
{

} // jpeg::jpeg() [constructor]
claw::graphic::jpeg::jpeg ( const image that )

Copy constructor.

Parameters:
thatImage to copy from.

Definition at line 50 of file jpeg.cpp.

  : claw::graphic::image(that)
{

} // jpeg::jpeg() [copy constructor]
claw::graphic::jpeg::jpeg ( std::istream &  f )

Constructor. Load an image from a jpeg file.

Parameters:
fJpeg file.

Definition at line 61 of file jpeg.cpp.

{
  reader(*this, f);
} // jpeg::jpeg() [constructor, from file]

Member Function Documentation

void claw::graphic::jpeg::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 jpeg.cpp.

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

{
  writer( *this, f, opt );
} // jpeg::save()

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