|
rigImage 0.1.0
RigKit pack API - rigImage
|
Load image files into a CPU raster and upload them as GLES textures. More...
Classes | |
| struct | rig::image::GpuTexture |
| GLES texture name. Destroy while the GL context is alive. More... | |
| struct | rig::image::FloatRaster |
| Linear RGBA float image. More... | |
Functions | |
| std::string | rig::image::resolvePath (const std::string &href, const std::string &basePath={}) |
Resolve a local href: as written, then basePath, then <exeDir>/data. | |
| bool | rig::image::size (const std::string &path, int &w, int &h) |
| Pixel width/height without a full decode. | |
| bool | rig::image::loadHdr (const std::string &path, FloatRaster &out, int maxEdge=kDefaultHdrMaxEdge) |
Decode a Radiance HDR (or any stb float image) into out. | |
| bool | rig::image::savePng (const std::string &path, const pixel::Raster &raster) |
Write raster as PNG. | |
Load image files into a CPU raster and upload them as GLES textures.
Texture names live in GpuTexture, not in a component, and must be destroyed while the GL context is alive. The long edge is capped before upload so Pi memory stays sane.
| std::string rig::image::resolvePath | ( | const std::string & | href, |
| const std::string & | basePath = {} ) |
Resolve a local href: as written, then basePath, then <exeDir>/data.
Empty when the href is a URL or no file exists.
| bool rig::image::savePng | ( | const std::string & | path, |
| const pixel::Raster & | raster ) |
Write raster as PNG.
Parent folder must exist.
| bool rig::image::size | ( | const std::string & | path, |
| int & | w, | ||
| int & | h ) |
Pixel width/height without a full decode.
False when the file is not an image.