App

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

ColorConvertor.hpp
Go to the documentation of this file.
1
7 // forward declaration
8 namespace app {
9 class ColorConvertor;
10 }
11
12 #ifndef COLORCONVERTOR_HPP_
13 #define COLORCONVERTOR_HPP_
14
15 #include "../typedefs.hpp"
16 #include "TBitmap.hpp"
17 #include "TPixel.hpp"
18
19 namespace app {
20
26 typedef enum {
27 R = 0,
28 G = 1,
29 B = 2,
30 A = 3,
31 H,
32 S,
33 V,
34 } ChannelType;
35
37
41 class ColorConvertor {
42 protected:
44
49 template <typename TPIXEL, typename TCHANNEL>
50 static int RGB_HSV(TBitmap<TPIXEL, TCHANNEL> &src);
51
53
58 template <typename TPIXEL, typename TCHANNEL>
59 static int HSV_RGB(TBitmap<TPIXEL, TCHANNEL> &src);
60
62
67 template <typename TPIXEL, typename TCHANNEL>
68 static int RGB_HLS(TBitmap<TPIXEL, TCHANNEL> &src);
69
71
76 template <typename TPIXEL, typename TCHANNEL>
77 static int HLS_RGB(TBitmap<TPIXEL, TCHANNEL> &src);
78
79
80 public:
82 ColorConvertor();
83
85 virtual ~ColorConvertor();
86
88
94 static int convert(rgba_8bit_bitmap &bitmap, ColorMode mode);
95 };
96
97 } /* namespace app */
98 #endif /* COLORCONVERTOR_HPP_ */