diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2020-02-29 16:12:26 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2020-02-29 17:32:33 +0100 |
commit | 15e9d38d36573ba0e1ec6e0cc2768b12ca01bff0 (patch) | |
tree | 5bceab5dfb37941cbc055a978780ed0a777228e5 /plugingui/image.h | |
parent | df32a5c6a6f8e204a757f68f0a61ea6f4843c569 (diff) |
WIP: Read images as uint8_t instead of float. Convert Colour and all colour related operations to use uint8_t instade of float and finally optimize rendering to render lines instead of single pixels.
Diffstat (limited to 'plugingui/image.h')
-rw-r--r-- | plugingui/image.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugingui/image.h b/plugingui/image.h index dd7f347..4d140ab 100644 --- a/plugingui/image.h +++ b/plugingui/image.h @@ -50,6 +50,9 @@ public: size_t height() const override; const Colour& getPixel(size_t x, size_t y) const override; + const std::uint8_t* line(std::size_t y) const override; + + bool hasAlpha() const override; bool isValid() const; @@ -62,8 +65,10 @@ private: std::size_t _width{0}; std::size_t _height{0}; std::vector<Colour> image_data; + std::vector<std::uint8_t> image_data_raw; Colour out_of_range{0.0f, 0.0f, 0.0f, 0.0f}; std::string filename; + bool has_alpha{false}; }; } // GUI:: |