-
Notifications
You must be signed in to change notification settings - Fork 14
rgb_premult
Chung Leong edited this page Jan 10, 2022
·
3 revisions
rgb_premult - Perform pre-multiplication on RGBA values
float[4] rgb_premult( float[4] $pixel )
rgb_premult() multiplies the red, blue, and green values of a pixel by its alpha value.
[rgb_demult] performs the reverse operation.
pixel - The RGBA values to convert. It can be a single four-element array or an array of such arrays.
An array containing the pre-multiplied RGBA values. The return value will have the same length as pixel.
1.4 and above.