function

gd_get_color . gd . sncode

VERSIONlatest Return a color index.

GD_GET_COLOR(1e)

NAME

gd_get_color - Returns a color index.

SYNOPSIS

gd_get_color (gd:variable, color:"string");

DESCRIPTION

This function is used to get a color index from the image.

Color index can be used in drawing function.

PARAMETERS

gd
Variable must hold a returned value from gd_new.
color
A color in the format #000000 or #255,255,255.

RETURN

A color index.

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

red = gd_get_color(gd:im, color:Red);
cyan = gd_get_color(gd:im, color:Cyan);
white = gd_get_color(gd:im, color:White);

AUTHOR

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