Save bitmaps as PNG
[lsnes.git] / include / library / pixfmt-rgb16.hpp
blobca9024f03ddd9af521fab6236b211fdf33cfe853
1 #ifndef _library__pixfmt_rgb16__hpp__included__
2 #define _library__pixfmt_rgb16__hpp__included__
4 #include "framebuffer.hpp"
6 /**
7 * Pixel format RGB16 (5:6:5).
8 */
9 template<bool uvswap>
10 class pixel_format_rgb16 : public pixel_format
12 public:
13 ~pixel_format_rgb16() 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_rgb16<false> _pixel_format_rgb16;
30 extern pixel_format_rgb16<true> _pixel_format_bgr16;
32 #endif