#include <Flek/FImage.H>
FImage provides four 8 bit channels (Red, Green, Blue and Alpha). The image is stored internally as an array of unsigned chars in RGBA order. The internal representation can be used directly by OpenGL with the GL_RGBA format and the GL_UNSIGNED_BYTE type.
FImage::FImage();
The default constructor does not allocate any space for the image.FImage::FImage(int w, int h, int channels=4);
This constructor allocated W*H pixels for storing the image.FImage::FImage(FImage *src);
The copy constructor.
iterator FImage::begin(int r);
Return an iterator connected to the first pixel on row r of the image.iterator FImage::begin();
Return an iterator connected to the first pixel in the image.
int FImage::channels();
Gets the number of channels.void FImage::channels(int c);
Sets the number of channels. Crops or expands the number of channels.
void FImage::clear(uchar r=0, uchar g=0, uchar b=0, uchar a=0);
Clear the image to a certain color.
iterator FImage::end(int r);
Return an iterator connected to the last+1 pixel on row r of the image.iterator FImage::end();
Return an iterator connected to the last+1 pixel in the image.
int FImage::height();
Gets the height of the image.
iterator FImage::operator()(int x, int y);
Return an iterator connected to position x, y.
FImage* FImage::scale(int w, int h);
A really bad scale function.
int FImage::width();
Gets the width of the image.
FImage::~FImage();
The destructor deallocated any allocated memory.