claw::graphic::bitmap::writer Class Reference

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

`#include <bitmap.hpp>`

Inherits claw::graphic::bitmap::file_structure.

## Public Member Functions

| writer (const image &img)
| Constructor. More...
| writer (const image &img, std::ostream &f)
| Constructor. More...
void | save (std::ostream &f) const
| Save the bitmap in a file. More...

## Detailed Description

This class write an image in a bitmap file.

Author
  Julien Jorge

Definition at line 296 of file bitmap.hpp.

## Constructor & Destructor Documentation

## writer() [1/2]

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

Constructor.

Parameters

  img | The image to save.

Definition at line 38 of file bitmap_writer.cpp.

## writer() [2/2]

claw::graphic::bitmap::writer::writer | ( | const image & | img,
|  | std::ostream & | f
| ) |  |

Constructor.

Parameters

  img | The image to save.
  f | The file in which we save the data.

Definition at line 50 of file bitmap_writer.cpp.

References save().

## Member Function Documentation

## save()

void claw::graphic::bitmap::writer::save | ( | std::ostream & | f | ) | const

Save the bitmap in a file.

Parameters

  f | Destination file.

Definition at line 61 of file bitmap_writer.cpp.

References claw::graphic::image::scanline::begin(), claw::graphic::bitmap::file_structure::header::bpp, claw::graphic::bitmap::file_structure::header::colors_count, claw::graphic::bitmap::file_structure::header::compression, claw::graphic::bitmap::file_structure::header::data_offset, claw::graphic::image::scanline::end(), claw::graphic::bitmap::file_structure::header::file_size, claw::graphic::bitmap::file_structure::header::header_size, claw::graphic::bitmap::file_structure::header::height, claw::graphic::image::height(), claw::graphic::bitmap::file_structure::header::id, claw::graphic::bitmap::file_structure::header::image_size, claw::graphic::bitmap::file_structure::header::importants_colors, claw::graphic::bitmap::file_structure::header::layers, claw::graphic::bitmap::file_structure::header::nop, claw::graphic::bitmap::file_structure::header::ppm_x, claw::graphic::bitmap::file_structure::header::ppm_y, claw::graphic::bitmap::file_structure::header::width, and claw::graphic::image::width().

Referenced by writer().

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

- bitmap.hpp
- code/bitmap_writer.cpp