faq | docs | tutorials | guide | reference | contact | home  


DEVNOTE: Integration of the open source GD Image library demonstrates the ease in which industry standard extensions can be used to enhance the FGL platform. A single FGL call registers the necessary "COM" object and exposes all of the functions within the library -- without the requirement of any changes to the original library.

gdImage = new( "com", "GDLibrary.gdImage" )     // this call creates an FGL object wrapper for the library

Edited quote from boutell.com
GD is an open source code library for the dynamic creation of images. GD creates PNG, JPEG and GIF images, among other formats. GD is commonly used to generate charts, graphics, thumbnails, and most anything else, on the fly. While not restricted to use on the web, the most common applications of GD involve web site development.

GDLibrary wrapper was developed by Trevor Herselman. GD is copyright 2005 Boutell.com, Inc. (http://www.boutell.com/gd/). GD was developed by Thomas Boutell.

Follow the instructions below to install GD library and GDLibrary.dll wrapper on Windows XP

1). Download the Windows Binaries package.
Click here to Download GD library form boutell.com or here for direct download.
Click here to Download GD library wrapper from codeproject.com or here for direct download.

2). Once you have the files unzipped, GD library binary "bgd.dll" has to be copied to the same folder where "engine.exe" resides (usually c:\fgl\), GD library wrapper "GDLibrary.dll" can be placed in the folder of your choice and has to be registered with regsvr32.

To do so from the command prompt execute:

C:\WINDOWS>regsvr32 dllname

dllname  :Specifies the name of the dll file that will be registered (dllname have to include path to the file example: C:\GDLibraryWrapper\GDLibrary.dll).

GD library Reference

GDLibrary.dll wrapper Reference

After following the above instructions you are ready to use the GD Library within FGL. The following examples demonstrate how to extend FGL through the registration of the GD Image COM file (requires a single line of code!). Thereafter, full access to the library is available from within FGL.

GD Image Examples

Example 1: - Page visitor counter

Screen shot:

Example 1 Source Code:

Example 2: - Demonstration of some of the capabilities of GD Library.

Screen shot:

Example 2 Source Code:

Documentation on this page contributed by Alex Wexler.