|
CLAW Library (a C++ Library Absolutely Wonderful) 1.5.5
|
RLE decoder for targa RLE format. More...
Public Types | |
| typedef InputBuffer | input_buffer_type |
| Type of the input buffer. | |
| typedef OutputBuffer | output_buffer_type |
| Type of the output buffer. | |
Private Member Functions | |
| virtual void | read_mode (input_buffer_type &input, output_buffer_type &output) |
| Get the type of the following data in the input buffer. | |
RLE decoder for targa RLE format.
Template parameters :
The OutputBuffer type must match the type requirements of the template parameter OutputBuffer of the rle_decoder class.
| typedef InputBuffer claw::graphic::targa::reader::rle_targa_decoder< InputBuffer, OutputBuffer >::input_buffer_type |
Type of the input buffer.
Reimplemented from claw::rle_decoder< rgba_pixel_8, InputBuffer, OutputBuffer >.
| typedef OutputBuffer claw::graphic::targa::reader::rle_targa_decoder< InputBuffer, OutputBuffer >::output_buffer_type |
Type of the output buffer.
Reimplemented from claw::rle_decoder< rgba_pixel_8, InputBuffer, OutputBuffer >.
| void claw::graphic::targa::reader::rle_targa_decoder< InputBuffer, OutputBuffer >::read_mode | ( | input_buffer_type & | input, |
| output_buffer_type & | output | ||
| ) | [private, virtual] |
Get the type of the following data in the input buffer.
| input | The input stream (the targa file). |
| output | The output stream (the targa image). |
Implements claw::rle_decoder< rgba_pixel_8, InputBuffer, OutputBuffer >.
Definition at line 199 of file targa_reader.tpp.
{
this->m_mode = this->stop;
bool ok = !output.completed();
if ( ok && (input.remaining() < 1) )
ok = input.read_more(1);
if (ok)
{
char key = input.get_next();
this->m_count = (key & 0x7F) + 1;
if (key & 0x80) // compressed
{
this->m_mode = this->compressed;
this->m_pattern = input.get_pixel();
}
else
this->m_mode = this->raw;
}
} // targa::reader::rle_targa_decoder::read_mode()
1.7.3