CGVIS Utils
Loading...
Searching...
No Matches
ImageLoader.h File Reference

Thin wrapper around stb_image to load common raster formats into Image. More...

#include "Vec2.h"
#include "Image.h"
Include dependency graph for ImageLoader.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ImageLoader::Exception
 Exception type thrown by ImageLoader on failures. More...

Namespaces

namespace  ImageLoader

Functions

Image ImageLoader::load (const std::string &filename, bool flipY=true)
 Load an image file using stb_image.

Detailed Description

Thin wrapper around stb_image to load common raster formats into Image.

Declares a convenience API to read image files using stb_image. The loader fills an Image with interleaved 8-bit components and supports an optional vertical flip to match a top-left origin.

Note
Implementation is provided in the corresponding translation unit and uses stbi_load/stbi_image_free. See the .cpp for details.