|
CLAW Library (a C++ Library Absolutely Wonderful) 1.5.5
|
Functor converting a 8bpp buffer to a 32bpp buffer. More...
Public Member Functions | |
| void | operator() (scanline &dest, const char *src, const color_palette_type &palette) const |
| Convert a 8bpp array to a pixel32 scanline. | |
Functor converting a 8bpp buffer to a 32bpp buffer.
Definition at line 239 of file bitmap.hpp.
| void claw::graphic::bitmap::reader::pixel8_to_pixel32::operator() | ( | scanline & | dest, |
| const char * | src, | ||
| const color_palette_type & | palette | ||
| ) | const |
Convert a 8bpp array to a pixel32 scanline.
| dest | (out) Filled scanline. |
| src | Pixel array to convert. |
| palette | Color palette. |
Definition at line 246 of file bitmap_reader.cpp.
References claw::graphic::image::scanline::begin(), and claw::graphic::image::scanline::size().
{
assert(palette.size() == 256);
const unsigned char* s = reinterpret_cast<const unsigned char*>(src);
std::transform(s, s + dest.size(), dest.begin(), palette);
} // bitmap::reader::pixel8_to_pixel32()
1.7.3