CGVIS Utils
Loading...
Searching...
No Matches
ImageLoader.h
Go to the documentation of this file.
1#pragma once
2
3#include "Vec2.h"
4#include "Image.h"
5
17namespace ImageLoader {
24 class Exception : public std::exception {
25 public:
30 Exception(const std::string& whatStr) : whatStr(whatStr) {}
31
36 virtual const char* what() const throw() {
37 return whatStr.c_str();
38 }
39 private:
40 std::string whatStr;
41 };
42
54 Image load(const std::string& filename, bool flipY=true);
55}
Lightweight image container with basic processing utilities.
2D vector template with arithmetic, length utilities, and helpers.
Definition Image.h:22
virtual const char * what() const
Retrieve the explanatory string.
Definition ImageLoader.h:36
Exception(const std::string &whatStr)
Construct with an explanatory message.
Definition ImageLoader.h:30
Definition ImageLoader.cpp:7
Image load(const std::string &filename, bool flipY)
Load an image file using stb_image.
Definition ImageLoader.cpp:8