-
16비트 65,000컬러 마스크 매크로 함수Programming 2008. 10. 24. 11:18#define MASK_RED 0xF800#define MASK_GREEN 0x07E0#define MASK_BLUE 0x001F
#define MEC_RED (x) (( (x) &MASK_RED) >> 11)#define MEC_GREEN(x) (( (x) &MASK_GREEN) >> 5)#define MEC_BLUE (x) ( (x) &MASK_BLUE)
Short형 컬러Red Green Blue 5 bit 6bit 5bit
ex) char Red;char Green;char Blue;
short Color; // 어떤컬러 값이 들어가있다 친다.
Red = MEC_RED ( Color );Green = MEC_GREEN ( Color );Blue = MEC_BLUE ( Color );