addAlpha
open fun addAlpha(substituteColor: Boolean, r: <Error class: unknown class>, g: <Error class: unknown class>, b: <Error class: unknown class>): Pixbuf?
Takes an existing pixbuf and adds an alpha channel to it.
If the existing pixbuf already had an alpha channel, the channel values are copied from the original; otherwise, the alpha channel is initialized to 255 (full opacity).
If substitute_color
is TRUE
, then the color specified by the (r
, g
, b
) arguments will be assigned zero opacity. That is, if you pass (255, 255, 255)
for the substitute color, all white pixels will become fully transparent.
If substitute_color
is FALSE
, then the (r
, g
, b
) arguments will be ignored.
Return
A newly-created pixbuf
Parameters
substituteColor
Whether to set a color to zero opacity.
r
Red value to substitute.
g
Green value to substitute.
b
Blue value to substitute.