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