Save bitmaps as PNG
[lsnes.git] / include / library / pixfmt-rgb24.hpp
blob73ffc25549dc20daf96a7891e225ecbcfdbe7489
1 #ifndef _library__pixfmt_rgb24__hpp__included__
2 #define _library__pixfmt_rgb24__hpp__included__
4 #include "framebuffer.hpp"
6 /**
7 * Pixel format RGB24.
8 */
9 template<bool uvswap>
10 class pixel_format_rgb24 : public pixel_format
12 public:
13 ~pixel_format_rgb24() throw();
14 void decode(uint32_t* target, const uint8_t* src, size_t width)
15 throw();
16 void decode(uint32_t* target, const uint8_t* src, size_t width,
17 const pixel_format_aux_palette<false>& auxp) throw();
18 void decode(uint64_t* target, const uint8_t* src, size_t width,
19 const pixel_format_aux_palette<true>& auxp) throw();
20 void set_palette(pixel_format_aux_palette<false>& auxp, uint8_t rshift, uint8_t gshift,
21 uint8_t bshift) throw(std::bad_alloc);
22 void set_palette(pixel_format_aux_palette<true>& auxp, uint8_t rshift, uint8_t gshift,
23 uint8_t bshift) throw(std::bad_alloc);
24 uint8_t get_bpp() throw();
25 uint8_t get_ss_bpp() throw();
26 uint32_t get_magic() throw();
29 extern pixel_format_rgb24<false> _pixel_format_rgb24;
30 extern pixel_format_rgb24<true> _pixel_format_bgr24;
32 #endif