#include <genesis/utils/formats/bmp/writer.hpp>
Write Bitmap image files.
Definition at line 58 of file utils/formats/bmp/writer.hpp.
Public Member Functions | |
BmpWriter ()=default | |
Default constructor. More... | |
BmpWriter (BmpWriter const &)=default | |
Default copy constructor. More... | |
BmpWriter (BmpWriter &&)=default | |
Default move constructor. More... | |
~BmpWriter ()=default | |
Default destructor. More... | |
BmpWriter & | operator= (BmpWriter const &)=default |
Default copy assignemnt. More... | |
BmpWriter & | operator= (BmpWriter &&)=default |
Default move assignemnt. More... | |
void | to_file (Matrix< Color > const &image, std::string const &filename) const |
Write a full 24bit RGB Color image to a file. More... | |
void | to_file (Matrix< unsigned char > const &image, std::string const &filename) const |
Write an 8 bit grayscale image to a file. More... | |
void | to_file (Matrix< unsigned char > const &image, std::vector< Color > const &palette, std::string const &filename) const |
Write an 8 bit image with a Color palette to a file. More... | |
void | to_stream (Matrix< Color > const &image, std::ostream &outstream) const |
Write a full 24bit RGB Color image to a stream. More... | |
void | to_stream (Matrix< unsigned char > const &image, std::ostream &outstream) const |
Write an 8 bit grayscale image to a stream. More... | |
void | to_stream (Matrix< unsigned char > const &image, std::vector< Color > const &palette, std::ostream &outstream) const |
Write an 8 bit image with a Color palette to a stream. More... | |
Classes | |
struct | BitmapFileheader |
Bitmap File Header. More... | |
struct | BitmapInfo |
Bitmap info that describes dimensions and color information. More... | |
struct | BitmapInfoheader |
Bitmap Info Header. More... | |
struct | RgbQuad |
Palette entry that describes an RGB Color. More... | |
|
default |
Default constructor.
|
default |
Default destructor.
Write a full 24bit RGB Color image to a file.
Definition at line 121 of file utils/formats/bmp/writer.cpp.
void to_file | ( | Matrix< unsigned char > const & | image, |
std::string const & | filename | ||
) | const |
Write an 8 bit grayscale image to a file.
The entries of the given Matrix are simply translated into a grayscale image, where 0
gives black and 255
gives white pixels.
Definition at line 144 of file utils/formats/bmp/writer.cpp.
void to_file | ( | Matrix< unsigned char > const & | image, |
std::vector< Color > const & | palette, | ||
std::string const & | filename | ||
) | const |
Write an 8 bit image with a Color palette to a file.
The given palette
needs to contain exaclty 256 Color entries. The values of the given image
Matrix are then mapped to the palette entries, e.g., the value at image( 2, 3 ) == 5
maps to the Color palette[ 5 ]
.
Definition at line 232 of file utils/formats/bmp/writer.cpp.
Write a full 24bit RGB Color image to a stream.
Definition at line 53 of file utils/formats/bmp/writer.cpp.
void to_stream | ( | Matrix< unsigned char > const & | image, |
std::ostream & | outstream | ||
) | const |
Write an 8 bit grayscale image to a stream.
The entries of the given Matrix are simply translated into a grayscale image, where 0
gives black and 255
gives white pixels.
Definition at line 132 of file utils/formats/bmp/writer.cpp.
void to_stream | ( | Matrix< unsigned char > const & | image, |
std::vector< Color > const & | palette, | ||
std::ostream & | outstream | ||
) | const |
Write an 8 bit image with a Color palette to a stream.
The given palette
needs to contain exaclty 256 Color entries. The values of the given image
Matrix are then mapped to the palette entries, e.g., the value at image( 2, 3 ) == 5
maps to the Color palette[ 5 ]
.
Definition at line 155 of file utils/formats/bmp/writer.cpp.