claw::graphic::jpeg::writer Class Reference

This class write an image in a jpeg file. More...

`#include <jpeg.hpp>`

## Classes

struct | destination_manager
| Destination manager that allow us to write in a std::ostream. More...
struct | options
| Parameters of the writing algorithm. More...

## Public Member Functions

| writer (const image &img)
| Constructor. More...
| writer (const image &img, std::ostream &f, const options &opt=options())
| Constructor. Save an image in a jpeg file. More...
void | save (std::ostream &f, const options &opt=options()) const
| Save an image in a jpeg file. More...

## Detailed Description

This class write an image in a jpeg file.

Author
  Julien Jorge

Definition at line 168 of file jpeg.hpp.

## Constructor & Destructor Documentation

## writer() [1/2]

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

Constructor.

Parameters

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

Definition at line 168 of file jpeg_writer.cpp.

## writer() [2/2]

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

Constructor. Save an image in a jpeg file.

Parameters

  img | The image from which we read the data.
  f | The file in which we write the data.
  opt | Options about the saved file.

Definition at line 182 of file jpeg_writer.cpp.

References save().

## Member Function Documentation

## save()

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

Save an image in a jpeg file.

Parameters

  f | Jpeg file.
  opt | Options about the saved file.

Definition at line 195 of file jpeg_writer.cpp.

References claw__graphic__jpeg__destination_manager__empty_output_buffer(), claw__graphic__jpeg__destination_manager__init_destination(), claw__graphic__jpeg__destination_manager__term_destination(), CLAW_EXCEPTION, CLAW_PRECOND, claw::graphic::jpeg::error_manager::error_string, claw::graphic::image::height(), claw::graphic::jpeg__error_manager__error_exit(), claw::graphic::jpeg::writer::options::progressive, claw::graphic::jpeg::writer::destination_manager::pub, claw::graphic::jpeg::error_manager::pub, claw::graphic::jpeg::writer::options::quality, claw::graphic::jpeg::error_manager::setjmp_buffer, and claw::graphic::image::width().

Referenced by writer().

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

- jpeg.hpp
- code/jpeg_writer.cpp