Goto main content

gd_get_size

Return width and height of image.

GD_GET_SIZE

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}.));

SEE ALSO

AUTHOR

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

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

Edit

© 2024 extenso Inc. All rights reserved.