include/vcl/bitmap/BitmapTypes.hxx |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 45a80756a97a906a5700b13e60e2a60d6f492197
Author:     Noel Grandin <[email protected]>
AuthorDate: Sat Sep 6 09:05:46 2025 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Sat Sep 6 12:06:24 2025 +0200

    document the weirdness of PixelFormat::N32_BPP
    
    Change-Id: I6e648e0152474c027f63bbf4079148f45fa005be
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190629
    Reviewed-by: Noel Grandin <[email protected]>
    Tested-by: Jenkins

diff --git a/include/vcl/bitmap/BitmapTypes.hxx 
b/include/vcl/bitmap/BitmapTypes.hxx
index 6f1cc220a977..8e11203cb100 100644
--- a/include/vcl/bitmap/BitmapTypes.hxx
+++ b/include/vcl/bitmap/BitmapTypes.hxx
@@ -15,7 +15,14 @@
 
 namespace vcl
 {
-/** Pixel format of the bitmap in bits per pixel */
+/** Pixel format of the bitmap in bits per pixel.
+
+    The N32_BPP value here is tricky, because some of the backends do not 
support 3-byte pixels, and will instead
+    use 4-byte pixels and ignore the 4th byte.
+    So, when creating a Bitmap, it means "give me something with 3 8-bit color 
channels and a 8-bit alpha channel"
+    But when getting the format of a bitmap, just means that the underlying 
bitmap has 32-bits per pixel,
+    it does not necessarily mean that the underlying bitmap has an active 
alpha channel.
+*/
 enum class PixelFormat
 {
     INVALID = 0,

Reply via email to