- substitute_color
- Whether to set a color to zero opacity. If this is false, then the (r, g, b) arguments will be ignored.
- r
- Red value to substitute
- g
- Green value to substitute
- b
- Blue value to substitute
A new pixbuf with an alpha channel.
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 (r, g, b) will be assigned zero opacity. That is, if you pass (255, 255, 255) for the substitute color, all white pixels will become fully transparent.
The original image is not modified, a copy of the image is made and returned.