out of day already, damn
This commit is contained in:
@ -34,6 +34,19 @@ namespace ams
|
||||
const uint8_t& operator[](const int ind) const;
|
||||
};
|
||||
|
||||
//a floating point pixel, normalized so that RGBA is
|
||||
// between 0 and 1
|
||||
struct amsfloatpixel
|
||||
{
|
||||
public:
|
||||
float R,G,B,A;
|
||||
|
||||
amspixel();
|
||||
amspixel(float _R ,float _G, float _B, float _A);
|
||||
uint8_t& operator[](const int ind);
|
||||
const uint8_t& operator[](const int ind) const;
|
||||
};
|
||||
|
||||
class amsimage
|
||||
{
|
||||
public:
|
||||
@ -79,13 +92,15 @@ namespace ams
|
||||
//todo
|
||||
|
||||
//applies image with alpha blending
|
||||
int apply_image(int I0, int J0, amsimage *img);
|
||||
int apply_image(int x0, int y0, const amsimage *img);
|
||||
|
||||
//applied color to any pixels where the bitplane's value is >= thresh
|
||||
int apply_bitplane_nz(int I0, int J0, 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);
|
||||
|
||||
//rescales the image with linear interpolation
|
||||
int rescale(int nnx, int nny);
|
||||
amsimage rescale(int nnx, int nny);
|
||||
};
|
||||
|
||||
int read_image(const char *fname, amsimage* image);
|
||||
@ -129,7 +144,7 @@ namespace ams
|
||||
void setall(uint8_t val);
|
||||
|
||||
//rescales the image with linear interpolation
|
||||
int rescale(int _Nx, int _Ny); //todo
|
||||
amsbitplane rescale(int _Nx, int _Ny); //todo
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user