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.
Definition at line 326 of file targa.hpp.
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). |
Definition at line 199 of file targa_reader.tpp.
References claw::rle_decoder< rgba_pixel_8, InputBuffer, OutputBuffer >::m_count, claw::rle_decoder< rgba_pixel_8, InputBuffer, OutputBuffer >::m_mode, and claw::rle_decoder< rgba_pixel_8, InputBuffer, OutputBuffer >::m_pattern.
{ 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()