Added getter for the pixelbuffer

This commit is contained in:
Leonetienne 2022-03-06 13:00:58 +01:00
parent 169a9c4892
commit 469b3cc18f
2 changed files with 14 additions and 0 deletions

View File

@ -203,6 +203,14 @@ namespace Leonetienne::BmpPP {
return;
}
std::vector<std::uint8_t> &BMP::GetPixelbuffer() {
return pixelBuffer;
}
const std::vector<std::uint8_t> &BMP::GetPixelbuffer() const {
return pixelBuffer;
}
}
#undef CHECK_IF_INITIALIZED

View File

@ -44,6 +44,12 @@ namespace Leonetienne::BmpPP {
//! Will return a pointer to the raw pixel data
[[nodiscard]] const std::uint8_t* data() const;
//! Will return the actual vector containing the raw pixel data
[[nodiscard]] std::vector<std::uint8_t>& GetPixelbuffer();
//! Will return the actual vector containing the raw pixel data
[[nodiscard]] const std::vector<std::uint8_t>& GetPixelbuffer() const;
//! Will return the dimensions of the image
[[nodiscard]] const Eule::Vector2i& GetDimensions() const;