33 #ifndef __IMAGETOOL_HEADERFILE__ 34 #define __IMAGETOOL_HEADERFILE__ 53 void flipImageY(
unsigned char* nDstBuffer,
unsigned const char* nSrcBuffer,
int nWidth,
int nHeight,
int nPixelSize);
59 return (
unsigned short)(((nRed << 8) & RED_MASK) | ((nGreen << 3) & GREEN_MASK) | (nBlue >> 3));
64 inline void convertPixel16To24(
unsigned short nPixel,
unsigned char& nRed,
unsigned char& nGreen,
unsigned char& nBlue)
66 nRed = (
unsigned char)((nPixel&
RED_MASK) >> 8);
67 nGreen = (
unsigned char)((nPixel&
GREEN_MASK) >> 3);
68 nBlue = (
unsigned char)((nPixel&
BLUE_MASK) << 3);
73 inline unsigned short blendPixel16(
unsigned short nSrc,
unsigned short nDst,
int nOpacity)
78 unsigned short G1 = (
unsigned short)(nDst & (
GREEN_MASK ));
80 unsigned short G2 = (
unsigned short)(nSrc & (
GREEN_MASK));
81 unsigned short RB = (
unsigned short)(RB1 + (((RB2-RB1) * (nOpacity>>3)) >> 5));
82 unsigned short G = (
unsigned short)(G1 + (((G2-G1)*(nOpacity>>2))>>6));
87 return (
unsigned short)(RB | G);
104 #endif //__IMAGETOOL_HEADERFILE__
const unsigned short GREEN_MASK
The Image class provides basic RGB565 image handing capabilities.
const unsigned short BLUE_MASK
const unsigned short RED_MASK