bitplane add
This commit is contained in:
@ -96,6 +96,9 @@ namespace ams
|
||||
int Nx,Ny;
|
||||
uint8_t *data; //[x+width*y]
|
||||
|
||||
int &width; //aliases for Nx,Ny
|
||||
int &height;
|
||||
|
||||
amsbitplane();
|
||||
~amsbitplane();
|
||||
amsbitplane(const amsbitplane& other);
|
||||
@ -104,11 +107,11 @@ namespace ams
|
||||
amsbitplane& operator=(amsbitplane&& other) noexcept;
|
||||
|
||||
int resize(int _Nx, int _Ny);
|
||||
void transpose();
|
||||
void rotcw();
|
||||
void rotccw();
|
||||
void flipx();
|
||||
void flipy();
|
||||
amsbitplane transpose();
|
||||
amsbitplane rotcw();
|
||||
amsbitplane rotccw();
|
||||
amsbitplane flipx();
|
||||
amsbitplane flipy();
|
||||
|
||||
uint8_t get(int I, int J) const;
|
||||
int set(int I, int J, uint8_t val);
|
||||
@ -123,13 +126,11 @@ namespace ams
|
||||
void clear();
|
||||
|
||||
//rescales the image with linear interpolation
|
||||
int rescale(int nnx, int nny);
|
||||
int rescale(int _Nx, int _Ny);
|
||||
};
|
||||
|
||||
|
||||
//Tests//
|
||||
|
||||
void amscppimglib_test1();
|
||||
|
||||
}; //end namespace ams
|
||||
|
||||
|
@ -80,6 +80,30 @@ void amsimage_region_set(
|
||||
amspixel val
|
||||
);
|
||||
|
||||
void amsimage_plane_copy(
|
||||
uint8_t *datato,
|
||||
int Ipto,
|
||||
int Npto,
|
||||
int Nxto,
|
||||
int Nyto,
|
||||
const uint8_t *datafrom,
|
||||
int Ipfrom,
|
||||
int Npfrom,
|
||||
int Nxfrom,
|
||||
int Nyfrom,
|
||||
int offsetx,
|
||||
int offsety
|
||||
);
|
||||
|
||||
void amsimage_planeregion_set(
|
||||
uint8_t *data,
|
||||
int Np, int Nx, int Ny,
|
||||
int Ip,
|
||||
int x0, int y0,
|
||||
int x1, int y1,
|
||||
uint8_t val
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user