|
|
@ -41,10 +41,16 @@ namespace ams
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
float R,G,B,A;
|
|
|
|
float R,G,B,A;
|
|
|
|
|
|
|
|
|
|
|
|
amspixel();
|
|
|
|
amsfloatpixel();
|
|
|
|
amspixel(float _R ,float _G, float _B, float _A);
|
|
|
|
amsfloatpixel(float _R ,float _G, float _B, float _A);
|
|
|
|
uint8_t& operator[](const int ind);
|
|
|
|
float& operator[](const int ind);
|
|
|
|
const uint8_t& operator[](const int ind) const;
|
|
|
|
const float& operator[](const int ind) const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
amsfloatpixel operator+(amsfloatpixel rhs);
|
|
|
|
|
|
|
|
amsfloatpixel operator-(amsfloatpixel rhs);
|
|
|
|
|
|
|
|
amsfloatpixel operator*(float rhs);
|
|
|
|
|
|
|
|
amsfloatpixel operator/(float rhs);
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class amsimage
|
|
|
|
class amsimage
|
|
|
@ -82,6 +88,9 @@ namespace ams
|
|
|
|
uint8_t& operator()(int Nc, int I, int J);
|
|
|
|
uint8_t& operator()(int Nc, int I, int J);
|
|
|
|
const uint8_t& operator()(int Nc, int I, int J) const;
|
|
|
|
const uint8_t& operator()(int Nc, int I, int J) const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
amsfloatpixel get_fpixel(int x, int y) const;
|
|
|
|
|
|
|
|
int set_fpixel(int x, int y, amsfloatpixel p);
|
|
|
|
|
|
|
|
|
|
|
|
void clear();
|
|
|
|
void clear();
|
|
|
|
void setall(amspixel color);
|
|
|
|
void setall(amspixel color);
|
|
|
|
|
|
|
|
|
|
|
@ -97,7 +106,7 @@ namespace ams
|
|
|
|
//applied color to any pixels where the bitplane's value is >= thresh
|
|
|
|
//applied color to any pixels where the bitplane's value is >= thresh
|
|
|
|
int apply_bitplane_mask(int x0, int y0, const amsbitplane* bp, amspixel color, uint8_t thresh);
|
|
|
|
int apply_bitplane_mask(int x0, int y0, const amsbitplane* bp, amspixel color, uint8_t thresh);
|
|
|
|
|
|
|
|
|
|
|
|
amsfloatpixel interpolate(float x, float y);
|
|
|
|
amsfloatpixel interpolate(float x, float y) const;
|
|
|
|
|
|
|
|
|
|
|
|
//rescales the image with linear interpolation
|
|
|
|
//rescales the image with linear interpolation
|
|
|
|
amsimage rescale(int nnx, int nny);
|
|
|
|
amsimage rescale(int nnx, int nny);
|
|
|
@ -138,6 +147,10 @@ namespace ams
|
|
|
|
const uint8_t& operator()(int I, int J) const;
|
|
|
|
const uint8_t& operator()(int I, int J) const;
|
|
|
|
uint8_t& operator[](long I);
|
|
|
|
uint8_t& operator[](long I);
|
|
|
|
const uint8_t& operator[](long I) const;
|
|
|
|
const uint8_t& operator[](long I) const;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
float getf(int x, int y) const;
|
|
|
|
|
|
|
|
int setf(int x, int y, float f) const;
|
|
|
|
|
|
|
|
float interpolate(int x, int y);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void clear();
|
|
|
|
void clear();
|
|
|
|