00001
00009 #ifndef CPIXELFORMAT_BGR555_H
00010 #define CPIXELFORMAT_BGR555_H
00011
00012 #include <fstream>
00013 #include "cpixelformat.h"
00014
00015
00016 #define BGR555_RED_SHIFT 10
00017 #define BGR555_GREEN_SHIFT 5
00018 #define BGR555_BLUE_SHIFT 0
00019 #define BGR555_RED_MASK 0x7C00
00020 #define BGR555_GREEN_MASK 0x03E0
00021 #define BGR555_BLUE_MASK 0x001F
00022
00030 class CPixelFormat_BGR555 : public CPixelFormat
00031 {
00032 public:
00042 CPixelFormat_BGR555(CBitmap *bitmap)
00043 : CPixelFormat(bitmap)
00044 {}
00045
00055 ~CPixelFormat_BGR555()
00056 {}
00057
00069 void getPixel(RGBPIXEL& pixel, uint32_t x, uint32_t y);
00070
00082 void setPixel(const RGBPIXEL& pixel, uint32_t x, uint32_t y);
00083
00093 uint32_t getBitCount()
00094 {
00095 return 16;
00096 }
00097
00107 void getMaxColor(RGBPIXEL& pixel)
00108 {
00109
00110 pixel.red = pixel.green = pixel.blue = 31;
00111 }
00112 };
00113
00114 #endif
00115
00116