45 virtual const char*
what()
const throw() {
46 return whatStr.c_str();
61 bool save(
const std::string& filename,
const Image& source,
bool ignoreSize=
false);
77 bool save(
const std::string& filename, uint32_t w, uint32_t h,
78 const std::vector<uint8_t>& data, uint8_t iComponentCount = 3,
79 bool ignoreSize=
false);
94 bool save(
const std::string& filename, uint32_t w, uint32_t h,
95 const std::vector<float>& data, uint8_t iComponentCount = 3,
96 bool ignoreSize=
false);
126 Image& target,
const Vec2ui& targetStart,
bool skipChecks=
false);
Lightweight image container with basic processing utilities.
2D vector template with arithmetic, length utilities, and helpers.
Vec2t< uint32_t > Vec2ui
32-bit unsigned integer vector (x,y).
Definition Vec2.h:262
BMPException(const std::string &whatStr)
Construct with an explanatory message.
Definition bmp.h:40
virtual const char * what() const
Retrieve the explanatory string.
Definition bmp.h:45
bool save(const std::string &filename, const Image &source, bool ignoreSize)
Save an Image to a BMP file.
Definition bmp.cpp:13
Image load(const std::string &filename)
Load a BMP file into an Image.
Definition bmp.cpp:110
void blit(const Image &source, const Vec2ui &rawSourceStart, const Vec2ui &rawSourceEnd, Image &target, const Vec2ui &targetStart, bool skipChecks)
Copy a rectangular region from source to target (blit).
Definition bmp.cpp:202