|
CGVIS Utils
|
Minimal BMP I/O utilities and a region blit helper. More...
#include <fstream>#include <iostream>#include <exception>#include <string>#include <sstream>#include "Vec2.h"#include "Image.h"Go to the source code of this file.
Classes | |
| class | BMP::BMPException |
| Exception type thrown by BMP I/O helpers. More... | |
Namespaces | |
| namespace | BMP |
Functions | |
| bool | BMP::save (const std::string &filename, const Image &source, bool ignoreSize=false) |
Save an Image to a BMP file. | |
| bool | BMP::save (const std::string &filename, uint32_t w, uint32_t h, const std::vector< uint8_t > &data, uint8_t iComponentCount=3, bool ignoreSize=false) |
| Save raw 8-bit component data to a BMP file. | |
| bool | BMP::save (const std::string &filename, uint32_t w, uint32_t h, const std::vector< float > &data, uint8_t iComponentCount=3, bool ignoreSize=false) |
| Save raw floating-point component data to a BMP file. | |
| Image | BMP::load (const std::string &filename) |
Load a BMP file into an Image. | |
| void | BMP::blit (const Image &source, const Vec2ui &sourceStart, const Vec2ui &sourceEnd, Image &target, const Vec2ui &targetStart, bool skipChecks=false) |
Copy a rectangular region from source to target (blit). | |
Minimal BMP I/O utilities and a region blit helper.
Provides functions to save images to 24/32-bit BMP, load BMP files into an Image, and copy a rectangular region between images. The save routines accept either an Image or raw component data (uint8_t or float).
save overload taking floats maps values in [0,1) to bytes via 
Image.