diff options
| author | Neil <nyamatongwe@gmail.com> | 2020-02-15 12:47:29 +1100 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2020-02-15 12:47:29 +1100 |
| commit | b82a2f50548c33bc6727a54e193a2cccaf4e12f7 (patch) | |
| tree | cab786fc8fdce3580a68bd38e7dd5946e8def1aa /src/XPM.h | |
| parent | 0eb0a3e5746f7d94c23337b24db9aa2d4871b739 (diff) | |
| download | scintilla-mirror-b82a2f50548c33bc6727a54e193a2cccaf4e12f7.tar.gz | |
Extract image conversion from RGBA to BGRA premultiplied into common function.
Diffstat (limited to 'src/XPM.h')
| -rw-r--r-- | src/XPM.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -50,6 +50,7 @@ class RGBAImage { float scale; std::vector<unsigned char> pixelBytes; public: + static constexpr size_t bytesPerPixel = 4; RGBAImage(int width_, int height_, float scale_, const unsigned char *pixels_); explicit RGBAImage(const XPM &xpm); RGBAImage(const RGBAImage &) = default; @@ -65,6 +66,7 @@ public: int CountBytes() const; const unsigned char *Pixels() const; void SetPixel(int x, int y, ColourDesired colour, int alpha); + static void BGRAFromRGBA(unsigned char *pixelsBGRA, const unsigned char *pixelsRGBA, size_t count) noexcept; }; /** |
