Added Read method

This commit is contained in:
Leonetienne
2022-03-05 22:00:57 +01:00
parent 33932906c4
commit 808738ac2e
9 changed files with 277 additions and 17 deletions

View File

@@ -9,12 +9,19 @@
namespace Leonetienne::BmpPP {
class BmpWriter;
class BmpReader;
class BMP {
public:
// Will create an uninitialized image
BMP();
//! Will create an image with the entire pixel buffer set to 0
explicit BMP(const Eule::Vector2i& size, const Colormode& colormode = Colormode::RGBA);
//! Will create a image and read it from a bmp file
explicit BMP(const std::string& filename);
//! Will return a pointer to the first byte of a pixel at a given position
std::uint8_t* GetPixel(const Eule::Vector2i& position);
@@ -66,6 +73,7 @@ namespace Leonetienne::BmpPP {
bool isInitialized = false;
friend class BmpWriter;
friend class BmpReader;
};
}