|
| Image () |
| Default constructor.
|
|
| Image (Image &&image) |
| Move constructor.
|
|
| Image (const Image &image) |
| Copy constructor.
|
|
| Image (uint width, uint height, Format format, unsigned char *data) |
| Constructor with parameters.
|
|
| Image (std::istream &in) |
| Constructor for reading from stream. More...
|
|
| Image (const std::string &path) |
| Constructor for reading from disk. More...
|
|
Image & | operator= (const Image &) |
| Copy constructor.
|
|
| ~Image () |
| Destructor.
|
|
bool | IsCompressed () const |
| Returns flag of compressed image.
|
|
uint | GetWidth () const |
| Returns image width.
|
|
uint | GetHeight () const |
| Returns image height.
|
|
Format | GetFormat () const |
| Returns image format.
|
|
unsigned char * | GetBits () const |
| Returns pointer to data that can be null.
|
|
bool | IsValid () const |
| Checks if image contains data.
|
|
void | Init (const std::string &fileName) |
| Loads image from file. More...
|
|
void | Init (std::istream &in) |
| Loads image from stream. More...
|
|
void | Init (uint w, uint h, Format f, std::unique_ptr< unsigned char[]> mem) |
| Initializes Image with parameters. More...
|
|
void | Init (uint w, uint h, Format f, const unsigned char *mem) |
| Initializes Image with parameters. More...
|
|
void | Init (const Image &other) |
| Initializes Image with parameters of another image.
|
|
void | SavePNG (std::ostream &out) const |
| Saves image in stream in PNG format. More...
|
|
void | SavePNG (const std::string &fileName) const |
| Saves image in stream in PNG format. More...
|
|
void | Clear () |
| Deletes image data.
|
|
Image | Scale (uint sw, uint sh) const |
| Creates copy of image with other sizes. More...
|
|
Image | SubImage (uint x, uint y, uint w, uint h) |
| Returns copied image part. More...
|
|
Image class provides tolls for loading/saving different image formats.
Image class often contains uncompressed data of an image and is one of the objects that can be uploaded to a texture. As a rule, Image object is used to load a texture, when it's necessary to perform an additional processing of an image before its loading or when you want to split the existing texture. Image has a set of useful functions and also gives an opportunity of direct access to pixels of image bit map.