GD

Last updated 2 September 2003

The code is provided as is, you can use it as you wish. But I would
appreciate it if you'd let me know if
you find a particularly useful purpose for it -
I might make some kind of gallery.
Feedback, suggestions and contributions to improve this software are
more than welcome; if you have any questions, remarks, bug fixes,
donations, postcards, or job offers, please
contact me:
info@nn-online.org

This is a module that provides a fortran 95 interface to the
wellknown GD Graphics Library
in c by Thomas Boutell.
As binding fortran to c is not portable yet, there is no guarantee that it
will work. I have tested it with a variety of compilers on several
unix platforms and I didn't encounter any problems though.

If you want to use it you need to have the GD library installed on
your system. The current instance of the module requires version
2.0.12 or newer of the GD library. As the GD library can be configured
to support jpeg, xpm, and the freetype2 library, you have the same
choices when compiling the fortran module. Gif support has
(rightfully)
been removed from the GD library long time ago, but for your
convenience all necessary c code has been included.
Consider using PNG though!

To compile the module: Edit the Makefile and change the necessary compiler
flags.
Add -DWITHOUT_FT to the C compiler flags (CFLAGS) and fortran compiler
flags (FFLAGS) if you don't want or don't have support for the
freetype2 library.
Add -DWITHOUT_GIF if you don't want support for gif images.
Add -DWITHOUT_JPEG if you don't want or don't have support for jpeg images.
Add -DWITHOUT_XPM if you don't want or don't have support for Xpm
images (read-only; however I haven't been able to get any decent results
from reading Xpm images, on none of the platforms I tried. I don't know
whether that is my fault, or a bug in the GD library).
You may need to add -DUNDERSCORE to the c compiler flags to make sure
the symbol names generated by the fortran and c compilers match.
I assumed the symbol names are always lower case.

When using the fonts with the freetype2 library, either give the
full path where to the place where the font file is found, or
set the environment variable GDFONTPATH to the directory where the
fontfiles are found and only use the file name.

I am currently halfway writing proper documentation. This is expected
to be finished before the end of 2003. The module tries to follow the
GD API so looking at the code, the test file and the
GD documentation
may help for the time being.