Переход на PixelArray
This commit is contained in:
parent
a1e42a0c28
commit
63b0d22340
3 changed files with 171 additions and 156 deletions
14
bmpimage.h
14
bmpimage.h
|
@ -55,8 +55,8 @@ public:
|
|||
|
||||
// Pixel operator()(const uint32_t &, const uint32_t &);
|
||||
// Pixel* operator()(const uint32_t &);
|
||||
Pixel operator()(const uint32_t &, const uint32_t &);
|
||||
Pixel* operator()(const uint32_t &);
|
||||
Pixel &operator()(const uint32_t &, const uint32_t &);
|
||||
Pixel* &operator()(const uint32_t &);
|
||||
};
|
||||
|
||||
class BMPImage {
|
||||
|
@ -64,9 +64,9 @@ class BMPImage {
|
|||
BITMAPINFOHEADER infoHeader;
|
||||
PixelArray pixelArray;
|
||||
public:
|
||||
BMPImage(const BitmapFileHeader &fileHeader, const BITMAPINFOHEADER &infoHeader, PixelArray pixelArray);
|
||||
BMPImage(const BitmapFileHeader &fileHeader, const BITMAPINFOHEADER &infoHeader, const PixelArray& pixelArray);
|
||||
|
||||
BMPImage(PixelArray pixelArray);
|
||||
BMPImage(const PixelArray& pixelArray);
|
||||
|
||||
~BMPImage();
|
||||
|
||||
|
@ -74,9 +74,9 @@ public:
|
|||
|
||||
[[nodiscard]] const uint32_t &height() const;
|
||||
|
||||
[[nodiscard]] const PixelArray pixels();
|
||||
[[nodiscard]] PixelArray pixels();
|
||||
|
||||
[[nodiscard]] Pixel **pixels_copy();
|
||||
[[nodiscard]] PixelArray pixels_copy();
|
||||
|
||||
[[nodiscard]] BitmapFileHeader fileHeader_copy();
|
||||
|
||||
|
@ -84,7 +84,7 @@ public:
|
|||
|
||||
void save(const std::string &);
|
||||
|
||||
BMPImage *appendRight(const BMPImage &);
|
||||
BMPImage appendRight(BMPImage &);
|
||||
};
|
||||
|
||||
BMPImage readBMPImage(const std::string &filename);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue