|
CGVIS Utils
|
Classes | |
| class | Exception |
| Exception type thrown by ImageLoader on failures. More... | |
Functions | |
| Image | load (const std::string &filename, bool flipY=true) |
| Load an image file using stb_image. | |
| Image ImageLoader::load | ( | const std::string & | filename, |
| bool | flipY = true ) |
Load an image file using stb_image.
| filename | Path to the image file (formats supported by stb_image). |
| flipY | If true, flip rows vertically on load (default: true). |
| Exception | If the file cannot be read/decoded. |
The loader preserves the component count reported by stb_image (e.g., 1/2/3/4). On success, pixel bytes are copied into the returned Image and the temporary buffer is freed.