Transform a color to its premultiplied version.
color
color-to-premultiplied color => result
color⇩ |
A color-spec. |
result |
A color-spec. |
The function color-to-premultiplied
transforms a color to its premultiplied version, which is needed when modifying images using Image Access.
color must be a color-spec, such as the result of a call to make-rgb (see 15.1 Color specs).
If color does not have an alpha component, it is returned without a change. If it does have alpha, it is transformed to RGB if needed, and premultiplied, returning a premultiplied RGB color.
You need to premultiply when setting pixels using Image Access in an image with alpha. The result is unconverted, so when using image-access-pixel it still needs to be converted (by convert-color).
color-from-premultiplied
image-access-pixel
image-access-pixels-to-bgra
image-access-pixels-from-bgra
13.10.8 Image access
CAPI User Guide and Reference Manual (Windows version) - 01 Dec 2021 19:34:21