claw::graphic::targa::reader Class Reference

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

`#include <targa.hpp>`

Inherits claw::graphic::targa::file_structure.

## Public Member Functions

| reader (image &img)
| Constructor. More...
| reader (image &img, std::istream &f)
| Constructor. More...
void | load (std::istream &f)
| Load an image from a targa file. More...

## Detailed Description

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

Author
  Julien Jorge

Definition at line 216 of file targa.hpp.

## Constructor & Destructor Documentation

## reader() [1/2]

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

Constructor.

Parameters

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

Definition at line 193 of file targa_reader.cpp.

## reader() [2/2]

claw::graphic::targa::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 206 of file targa_reader.cpp.

References load().

## Member Function Documentation

## load()

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

Load an image from a targa file.

Parameters

  f | Targa file.

Definition at line 217 of file targa_reader.cpp.

References claw::graphic::targa::file_structure::header::specification::bpp, CLAW_EXCEPTION, CLAW_PRECOND, claw::graphic::targa::file_structure::header::color_map_specification, claw::graphic::targa::file_structure::header::entry_size, claw::graphic::targa::file_structure::header::specification::height, claw::graphic::targa::file_structure::header::id_length, claw::graphic::targa::file_structure::header::image_specification, claw::graphic::targa::file_structure::header::image_type, claw::graphic::targa::file_structure::footer::is_valid(), claw::graphic::targa::file_structure::header::length, claw::graphic::image::set_size(), and claw::graphic::targa::file_structure::header::specification::width.

Referenced by reader().

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

- targa.hpp
- code/targa_reader.cpp