function

gd_get_size . gd . sncode

VERSIONlatest Return width and height of image.

GD_GET_SIZE(1e)

NAME

gd_get_size - Returns width and height of an image.

SYNOPSIS

gd_get_size (gd:variable);

DESCRIPTION

This function is used to get width and height of an image.

PARAMETERS

gd
Variable must hold a returned value from gd_new.

RETURN

Returns a context with wight and heigth.

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

res=<{
        %include "/includes/gd.sn";
        remove("/html/images/bg.gif");
        im=gd_new(width:100,height:110,bgcolor:Yellow,truecolor:true);
        gd_write(gd:im, format:"gif", filename:"/html/images/bg.gif");
        gd_get_size(im);
        gd_get_pixel(gd:im,x:0,y:0);
        gd_free(gd:im);}>. return

res={"width":100,"height":110}{"green":255,"blue":0,"red":255,"color":16776960}.));

AUTHOR

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