16 Image(std::string filename);
17 Image(
const std::vector<float> &data,
int width,
int height,
int channels);
19 void setPixel(
int x,
int y,
float r,
float g,
float b);
20 void setPixel(
int x,
int y,
float r,
float g,
float b,
float a);
21 float getPixelR(
int x,
int y);
22 float getPixelG(
int x,
int y);
23 float getPixelB(
int x,
int y);
24 float getPixelA(
int x,
int y);
25 void convertToColor(
bool alphaChannel);
26 void convertToGray(
bool alphaChannel);
27 void read(std::string filename);
28 void write(std::string filename);
29 static constexpr
const float mRToGray = 0.30f;
30 static constexpr
const float mGToGray = 0.59f;
31 static constexpr
const float mBToGray = 0.11f;