#include <Image.hpp>
Definition at line 36 of file Image.hpp.
Compressed image formats
Enumerator |
---|
DXT1RGB |
|
DXT1RGBA |
|
DXT3RGBA |
|
DXT5RGBA |
|
Definition at line 42 of file Image.hpp.
void jop::Image::flipHorizontally |
( |
| ) |
|
brief Flip image horizontally
Doesn't work correctly with compressed images.
void jop::Image::flipVertically |
( |
| ) |
|
Flip image vertically.
Doesn't work correctly with compressed images.
Format jop::Image::getFormat |
( |
| ) |
const |
Get internal compressed image format.
- Returns
- The compressed image format
- See also
- isCompressed()
unsigned int jop::Image::getMipMapCount |
( |
| ) |
const |
Get the amount of mipmap levels in compressed image.
- Returns
- The amount of mipmap levels
uint32 jop::Image::getPixelDepth |
( |
| ) |
const |
Get image pixel depth.
- Returns
- Image pixel depth in bytes
const uint8* jop::Image::getPixels |
( |
| ) |
const |
Get pixels of this image.
- Returns
- Pointer to the pixel data
unsigned int jop::Image::getPixelSize |
( |
| ) |
const |
Get the pixel data size.
- Returns
- The pixel data size in bytes
glm::uvec2 jop::Image::getSize |
( |
| ) |
const |
Get the dimensions of the image.
- Returns
- The image dimensions
bool jop::Image::isCompressed |
( |
| ) |
const |
Check if the image is compressed.
- Returns
- True if compressed
bool jop::Image::isCubemap |
( |
| ) |
const |
Check if this image is a cube map.
- Returns
- True if cube map
bool jop::Image::load |
( |
const std::string & |
path, |
|
|
const bool |
allowCompression = true |
|
) |
| |
Load from file.
- Parameters
-
path | The file path |
allowCompression | Allow compression? |
- Returns
- True if successful
bool jop::Image::load |
( |
const void * |
ptr, |
|
|
const uint32 |
size |
|
) |
| |
Load the image from memory.
- Parameters
-
ptr | Pointer to data |
size | Size of the data |
- Returns
- True if successful
bool jop::Image::load |
( |
const glm::uvec2 & |
size, |
|
|
const uint32 |
bytesPerPixel, |
|
|
const unsigned char * |
pixels |
|
) |
| |
Load the image from memory.
- Parameters
-
size | The size |
bytesPerPixel | The byte depth of the image |
pixels | Pointer to the beginning of the pixel array |
- Returns
- True if successful
The documentation for this class was generated from the following file: