|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
| std::shared_ptr< Buffers::TextureBuffer > MayaFlux::IO::IOManager::load_image | ( | const std::string & | filepath, |
| int | desired_channels = 4, |
||
| std::optional< Kakshya::Region > | region = std::nullopt |
||
| ) |
Load an image file into a TextureBuffer.
Opens the file via ImageReader, decodes to the requested channel layout, and creates a TextureBuffer containing the pixel data. The reader is retained for the lifetime of IOManager.
| filepath | Path to the image file (PNG, JPG, BMP, TGA, etc.). |
| desired_channels | Channel count passed to ImageReader (0 keeps the source layout). |
| region | Optional source-pixel rectangle with inclusive end coordinates. |
Definition at line 755 of file IOManager.cpp.
References MayaFlux::Journal::API, MayaFlux::Journal::FileIO, m_image_readers, MF_ERROR, and MF_INFO.