claw::graphic::bitmap::reader Class Reference

This class read data from a bitmap file and store it in an image. More...

`#include <bitmap.hpp>`

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

## Public Member Functions

| reader (image &img)
| Constructor. More...
| reader (image &img, std::istream &f)
| Constructor. More...
void | load (std::istream &f)
| Load the image data from a stream. More...

## Detailed Description

This class read data from a bitmap file and store it in an image.

Author
  Julien Jorge

Definition at line 134 of file bitmap.hpp.

## Constructor & Destructor Documentation

## reader() [1/2]

claw::graphic::bitmap::reader::reader | ( | image & | img | ) |

Constructor.

Parameters

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

Definition at line 287 of file bitmap_reader.cpp.

## reader() [2/2]

claw::graphic::bitmap::reader::reader | ( | image & | img,
|  | std::istream & | f
| ) |  |

Constructor.

Parameters

  img | The image in which the data will be stored.
  f | The file from which we read the data.

Postcondition
  img contains the data from f.

Definition at line 300 of file bitmap_reader.cpp.

References load().

## Member Function Documentation

## load()

void claw::graphic::bitmap::reader::load | ( | std::istream & | f | ) |

Load the image data from a stream.

Parameters

  f | The file from which we read the data.

Postcondition
  The image passed to the constructor contains the data from f.

Definition at line 312 of file bitmap_reader.cpp.

References claw::graphic::bitmap::file_structure::header::bpp, CLAW_PRECOND, claw::graphic::bitmap::file_structure::header::compression, claw::graphic::bitmap::file_structure::header::data_offset, claw::graphic::bitmap::file_structure::header::height, claw::graphic::bitmap::file_structure::header::id, claw::graphic::image::set_size(), claw::graphic::bitmap::file_structure::header::width, and claw::graphic::image::width().

Referenced by reader().

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

- bitmap.hpp
- code/bitmap_reader.cpp