From efa27a70d634e0c9f65f71f3f8fcd9d748ded5c7 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 29 Dec 2022 13:18:45 +1100 Subject: [PATCH] Document the meaning of "premultiplied alpha" --- docs/handbook/concepts.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/handbook/concepts.rst b/docs/handbook/concepts.rst index ed25e186508..01f75e9a35d 100644 --- a/docs/handbook/concepts.rst +++ b/docs/handbook/concepts.rst @@ -64,6 +64,12 @@ Pillow also provides limited support for a few additional modes, including: * ``BGR;24`` (24-bit reversed true colour) * ``BGR;32`` (32-bit reversed true colour) +Premultiplied alpha is where the values for each other channel have been +multiplied by the alpha. For example, an RGBA pixel of ``(10, 20, 30, 127)`` +would convert to an RGBa pixel of ``(5, 10, 15, 127)``. The values of the R, +G and B channels are halved as a result of the half transparency in the alpha +channel. + Apart from these additional modes, Pillow doesn't yet support multichannel images with a depth of more than 8 bits per channel.