152 template <
bool Coded4bits>
153 class rle_bitmap_output_buffer
156 rle_bitmap_output_buffer(
const color_palette_type& palette,
160 void copy(
unsigned int n, file_input_buffer& buffer);
163 void delta_move(
unsigned char x,
unsigned char y);
167 const color_palette_type& m_palette;
196 template <
typename OutputBuffer>
197 class rle_bitmap_decoder
198 :
public rle_decoder<char, file_input_buffer, OutputBuffer>
202 typedef OutputBuffer output_buffer_type;
205 virtual void read_mode(file_input_buffer& input,
206 output_buffer_type& output);
210 typedef rle_bitmap_decoder<rle_bitmap_output_buffer<true> >
214 typedef rle_bitmap_decoder<rle_bitmap_output_buffer<false> >
220 class pixel1_to_pixel32
223 void operator()(
scanline& dest,
const char* src,
224 const color_palette_type& palette)
const;
230 class pixel4_to_pixel32
233 void operator()(
scanline& dest,
const char* src,
234 const color_palette_type& palette)
const;
240 class pixel8_to_pixel32
243 void operator()(
scanline& dest,
const char* src,
244 const color_palette_type& palette)
const;
250 class pixel24_to_pixel32
253 void operator()(
scanline& dest,
const char* src,
254 const color_palette_type& palette)
const;
261 void load(std::istream& f);
264 void load_palette(
const header& h, std::istream& f,
265 color_palette_type& palette)
const;
267 void load_1bpp(
const header& h, std::istream& f);
268 void load_4bpp(
const header& h, std::istream& f);
269 void load_8bpp(
const header& h, std::istream& f);
270 void load_24bpp(
const header& h, std::istream& f);
272 void load_4bpp_rle(
const header& h, std::istream& f,
273 const color_palette_type& palette);
274 void load_4bpp_rgb(
const header& h, std::istream& f,
275 const color_palette_type& palette);
276 void load_8bpp_rle(
const header& h, std::istream& f,
277 const color_palette_type& palette);
278 void load_8bpp_rgb(
const header& h, std::istream& f,
279 const color_palette_type& palette);
281 template <
typename Convert>
282 void load_rgb_data(std::istream& f,
unsigned int buffer_size,
283 const color_palette_type& palette,
284 const Convert& pixel_convert);