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

Functor converting a 24bpp buffer to a 32bpp buffer. More...

List of all members.

Public Member Functions

void operator() (scanline &dest, const char *src, const color_palette_type &palette) const
 Convert a BGR array to a pixel32 scanline.

Detailed Description

Functor converting a 24bpp buffer to a 32bpp buffer.

Definition at line 249 of file bitmap.hpp.


Member Function Documentation

void claw::graphic::bitmap::reader::pixel24_to_pixel32::operator() ( scanline dest,
const char *  src,
const color_palette_type palette 
) const

Convert a BGR array to a pixel32 scanline.

Parameters:
dest (out) Filled scanline.
src Pixel array to convert.
palette (not used) Color palette.

Definition at line 263 of file bitmap_reader.cpp.

References claw::graphic::image::scanline::begin(), and claw::graphic::image::scanline::size().

00264 {
00265   scanline::iterator it( dest.begin() );
00266   const unsigned int upper_bound = 3 * dest.size();
00267 
00268   for (unsigned int i=0; i!=upper_bound; i+=3)
00269     {
00270       it->components.alpha = 255;
00271       it->components.blue  = src[i];
00272       it->components.green = src[i+1];
00273       it->components.red   = src[i+2];
00274 
00275       ++it;
00276     }
00277 } // bitmap::reader::pixel24_to_pixel32()


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

Generated on 9 Nov 2009 for CLAW Library (a C++ Library Absolutely Wonderful) by  doxygen 1.6.1