19 Image(
size_t width,
size_t height);
26 Image(std::filesystem::path path);
33 void load(std::filesystem::path path);
40 void save(std::filesystem::path path)
const;
A class for working with images and textures.
Definition: Image.hpp:11
static Image ICON_FILES_IMAGE
Definition: Image.hpp:67
uint64_t getTextureId() const
Get the OpenGL texture ID associated with the image.
Definition: Image.cpp:56
static Image ICON_FILES_FOLDER
Definition: Image.hpp:65
void save(std::filesystem::path path) const
Save the image to a file in PNG format.
Definition: Image.cpp:33
static Image ICON_FILES_PYTHON
Definition: Image.hpp:66
static Image ICON_BUTTON_STOP
Definition: Image.hpp:71
static Image ICON_CONSOLE_ERROR
Definition: Image.hpp:56
uint8_t * _data
The image pixel data.
Definition: Image.hpp:74
Image(size_t width, size_t height)
Constructor for creating an image with the specified width and height.
Definition: Image.cpp:19
void load(std::filesystem::path path)
Load an image from a file.
Definition: Image.cpp:26
void updateTextureId()
Update the OpenGL texture ID associated with the image.
Definition: Image.cpp:37
static Image ICON_CONSOLE_SUCCESS
Definition: Image.hpp:59
static Image ICON_CONSOLE_VERBOSE
Definition: Image.hpp:58
int _width
The width of the image.
Definition: Image.hpp:76
static Image ICON_BUTTON_PLAY
Definition: Image.hpp:70
static Image ICON_FILES_TEXT
Definition: Image.hpp:68
static Image ICON_COMPONENT_TRANSFORM
Definition: Image.hpp:61
int _components
The number of color components.
Definition: Image.hpp:78
static Image ICON_COMPONENT_SCRIPT
Definition: Image.hpp:62
static Image ICON_CONSOLE_TOTAL
Definition: Image.hpp:55
uint64_t _textureId
The OpenGL texture ID.
Definition: Image.hpp:81
static Image ICON_CONSOLE_INFO
Definition: Image.hpp:57
static Image ICON_COMPONENT_SHAPE
Definition: Image.hpp:63
int _height
The height of the image.
Definition: Image.hpp:77
bool _wasAssignedTextureId
Flag indicating if the texture ID has been assigned.
Definition: Image.hpp:80