/usr/include/ossim/base/ossimJpegYCbCrVector.h is in libossim-dev 1.7.21-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | //*******************************************************************
//
// License: See top level LICENSE.txt file.
//
// Author: Garrett Potts
// Description:
//
//*************************************************************************
// $Id: ossimJpegYCbCrVector.h 14789 2009-06-29 16:48:14Z dburken $
#ifndef ossimJpegYCbCrVector_HEADER
#define ossimJpegYCbCrVector_HEADER
#include <iostream>
using namespace std;
#include <ossim/base/ossimConstants.h>
class ossimRgbVector;
class OSSIMDLLEXPORT ossimJpegYCbCrVector
{
public:
friend ostream& operator << (ostream& out, const ossimJpegYCbCrVector& data)
{
out << "<" << (long)data.theBuf[0] << ", "
<< (long)data.theBuf[1] << ", "
<< (long)data.theBuf[2] << ">";
return out;
}
ossimJpegYCbCrVector(unsigned char Y=0,
unsigned char Cb=0,
unsigned char Cr=0)
{
theBuf[0] = Y;
theBuf[1] = Cb;
theBuf[2] = Cr;
}
ossimJpegYCbCrVector(const ossimRgbVector&);
long clamp(long colorValue, unsigned char min=0, unsigned char max=255)const
{
colorValue = colorValue > max? max:colorValue;
colorValue = colorValue < min? min:colorValue;
return colorValue;
}
ossimJpegYCbCrVector& operator =(const ossimRgbVector&);
unsigned char getY() const { return theBuf[0]; }
unsigned char getCb()const { return theBuf[1]; }
unsigned char getCr()const { return theBuf[2]; }
void setY(unsigned char Y) { theBuf[0] = Y; }
void setCb(unsigned char Cb) { theBuf[1] = Cb; }
void setCr(unsigned char Cr) { theBuf[2] = Cr; }
protected:
/*!
* JpegYCbCr is an 8-bit YCbCr color model. We
* will let:
* buf[0] = Y
* buf[1] = Cb
* buf[2] = Cr
*/
unsigned char theBuf[3];
};
#endif
|