Claw  1.7.3
Classes | Public Member Functions | List of all members
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.

Classes

class  pixel1_to_pixel32
 Functor converting a 1bpp buffer to a 32bpp buffer.
class  pixel24_to_pixel32
 Functor converting a 24bpp buffer to a 32bpp buffer.
class  pixel4_to_pixel32
 Functor converting a 4bpp buffer to a 32bpp buffer.
class  pixel8_to_pixel32
 Functor converting a 8bpp buffer to a 32bpp buffer.
class  rle_bitmap_decoder
 RLE decoder for bitmap RLE format.
class  rle_bitmap_output_buffer
 The output buffer for the RLE decoder.

Public Member Functions

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

Additional Inherited Members

- Private Types inherited from claw::graphic::bitmap::file_structure
enum  compression { BMP_COMPRESSION_RGB = 0, BMP_COMPRESSION_RLE8 = 1, BMP_COMPRESSION_RLE4 = 2, BMP_COMPRESSION_BITFIELDS = 3 }
 Compression mode.
typedef color_palette
< rgba_pixel_8
color_palette_type
 The type of the color palette for low color image files.

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

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

Constructor.

Parameters
imgThe image in which the data will be stored.

Definition at line 287 of file bitmap_reader.cpp.

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

Constructor.

Parameters
imgThe image in which the data will be stored.
fThe 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

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

Load the image data from a stream.

Parameters
fThe 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::height, claw::graphic::bitmap::file_structure::header::id, and claw::graphic::bitmap::file_structure::header::width.

Referenced by reader().


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