Goto main content

gd_free

Free/Relase memory for a GD structure.

GD_FREE

NAME

gd_free - Frees/Releases memory for a GD structure.

SYNOPSIS

gd_free (gd:variable);

DESCRIPTION

This function is used to release memory of gd structure.

PARAMETERS

gd
Variable must hold a return value from gd_new.

RETURN

Nothing. Null.

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

%include "/includes/gd.sn";
remove("/html/images/crop1.jpg");
remove("/html/images/crop2.jpg");
remove("/html/images/crop3.jpg");
imsrc=gd_new(filename:"/html/images/20130708-1944-londres.jpg",truecolor:true);
imdst=gd_new(width:1000,height:1000,bgcolor:Blue,truecolor:true);
gd_write(gd:imdst,format:"jpg",filename:"/html/images/crop3.jpg");
gd_crop(gdsrc:imsrc, gddst:imdst,srcx:400,srcy:400,srcw:800,srch:800,dstx:50,dsty:50);
gd_write(gd:imsrc,format:"jpg",filename:"/html/images/crop1.jpg");
gd_write(gd:imdst,format:"jpg",filename:"/html/images/crop2.jpg",quality:100);
gd_free(imsrc);
gd_free(imdst);

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.