16 #define RED_WEIGHT 0.299
17 #define GREEN_WEIGHT 0.587
18 #define BLUE_WEIGHT 0.114
31 BgImage(
int,
int,
bool colorIm =
false);
34 void SetImage(
unsigned char*,
int,
int,
bool colorIm =
false);
35 void SetImageFromRGB(
unsigned char*,
int,
int,
bool colorIm =
false);
36 void SetSameImageFromRGB(
unsigned char*);
37 void SetImage(
short*,
int,
int,
bool colorIm =
false);
38 void GetImage(
unsigned char*);
39 void GetImageBW(
unsigned char*);
40 void GetImageColor(
unsigned char*);
41 void GetImageR(
unsigned char*);
42 void GetImageG(
unsigned char*);
43 void GetImageB(
unsigned char*);
44 bool ValidCoord(
int,
int);
45 int ValidReturnBW(
int in_x,
int in_y,
int& cval);
46 int ValidReturnCol(
int in_x,
int in_y,
int& rval,
int& gval,
int& bval);
47 int ReturnCol(
int in_x,
int in_y,
int& rval,
int& gval,
int& bval);
49 inline int GetWidth() {
return x_;};
50 inline int GetHeight() {
return y_;};
53 const BgImage& operator=(
const BgImage& im);
54 bool IsAllocated(
void)
const;
57 inline unsigned char operator()(
int,
int)
const;
58 inline unsigned char& operator()(
int,
int);
59 unsigned char PixelValue(
int,
int);
61 void Resize(
int width,
int height,
bool color);
64 void PrivateCopyToThis(
const BgImage& im);
65 void PrivateResize(
int width,
int height,
bool color);
69 extern inline unsigned char gBgImPt(BgImage*,
int,
int);