From a65278c7bc9c0dbca8a74db09fd0aebf1c26ef28 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 29 Feb 2020 16:12:26 +0100 Subject: 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. --- plugingui/image.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'plugingui/image.h') 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 image_data; + std::vector image_data_raw; Colour out_of_range{0.0f, 0.0f, 0.0f, 0.0f}; std::string filename; + bool has_alpha{false}; }; } // GUI:: -- cgit v1.2.3