8 theBuf[0] =
static_cast<unsigned char>(
clamp(ossim::round<int>(0.299*rgbColor.
getR() +
9 0.587*rgbColor.
getG() +
10 0.114*rgbColor.
getB())));
12 theBuf[1] =
static_cast<unsigned char>(
clamp(ossim::round<int>((-0.1687)*rgbColor.
getR() -
13 0.3313*rgbColor.
getG() +
14 0.5*rgbColor.
getB() + 128)));
16 theBuf[2] =
static_cast<unsigned char>(
clamp(ossim::round<int>(0.5*rgbColor.
getR() -
17 .4187*rgbColor.
getG() -
18 .0813*rgbColor.
getB() + 128)));
24 theBuf[0] =
static_cast<unsigned char>(
clamp(ossim::round<int>(0.299*rgbColor.
getR() +
25 0.587*rgbColor.
getG() +
26 0.114*rgbColor.
getB())));
28 theBuf[1] =
static_cast<unsigned char>(
clamp(ossim::round<int>((-0.1687)*rgbColor.
getR() -
29 0.3313*rgbColor.
getG() +
30 0.5*rgbColor.
getB() + 128)));
32 theBuf[2] =
static_cast<unsigned char>(
clamp(ossim::round<int>(0.5*rgbColor.
getR() -
33 .4187*rgbColor.
getG() -
34 .0813*rgbColor.
getB() + 128)));
unsigned char getR() const
ossimJpegYCbCrVector(unsigned char Y=0, unsigned char Cb=0, unsigned char Cr=0)
unsigned char getB() const
unsigned char getG() const
long clamp(long colorValue, unsigned char min=0, unsigned char max=255) const
ossimJpegYCbCrVector & operator=(const ossimRgbVector &)