From e9ad1ca55ad5228ae94bdb242ec1560349b0c440 Mon Sep 17 00:00:00 2001 From: Leonetienne Date: Sun, 6 Mar 2022 19:22:46 +0100 Subject: [PATCH] Readme --- readme.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 175bab4..fd26bb5 100644 --- a/readme.md +++ b/readme.md @@ -115,15 +115,17 @@ bmp.FillChannel(3, 255); ```c++ // Convert BGR to RGB, by swapping the red and blue channels. bmp.SwapChannels(0, 2); + +// Obviously: red->0, green->1, blue->2, alpha->3 ``` -##### Feed in existing pixel buffer +##### Feed in an existing pixel buffer ```c++ // OK, this is a bit more complex, but here's how to do it // This is assumed to be an RGBA pixel buffer, formatted like: // RGBARGBARGBARGBARGBARGBARGBA, with pixels in the same row lying next to each other in memory. -std::vector yourPixelbuffer; +const std::vector yourPixelbuffer; // Create a BMP instance with your resolution, and color mode BMP bmp(Vector2i(img_height, img_width), Colormode::RGBA);