function

gd_alpha_blending . gd . sncode

VERSIONlatest Set alpha blending in GD

gd_alpha_blending(1e)

NAME

gd_alpha_blending - Set blending mode.

SYNOPSIS

gd_alpha_blending(image, integer);

DESCRIPTION

This function is used to set the the alpha blending for an image. From GD:

The gdImageAlphaBlending function allows for two different modes of drawing on truecolor images. In blending mode, which is on by default (gd 2.0.2 and above), the alpha channel component of the color supplied to all drawing functions, such as gdImageSetPixel, determines how much of the underlying color should be allowed to shine through. As a result, gd automatically blends the existing color at that point with the drawing color, and stores the result in the image. The resulting pixel is opaque. In non-blending mode, the drawing color is copied literally with its alpha channel information, replacing the destination pixel. Blending mode is not available when drawing on palette images.

MODULES

To use this module, you must specify the following in /usr/local/website/site.conf:

Module gd {
        Library : "/usr/local/lib/libsngd.so"
        Init : "sngd_init"
}

EXAMPLES

gd_alpha_blending(im,1);

AUTHOR

Written by Pierre Laplante, <laplante@sednove.com>