Tuesday, October 26. 2004
By popular demand I've put together the example code I've used throughout some of my recent talks (most recently in my
Object Oriented Programming in PHP 5 talk given at
php|works) to highlight different features or functionality in PHP 5 / GD. I've released it under my self-dubbed
Coggeshall.org License (Which is basically equals BSD) and gave it the very original name GDObjects.
The basic idea behind GDObjects is to provide an object-oriented wrapper library for the now very old (and relatively cumbersome) to use GD extension for PHP which is much easier to use and work with. Since I did write this code originally for the purpose of example, hopefully you'll also learn a thing or two about PHP 5 OO and advanced GD manipulations along the way. There are some neat things about it (such as centered cropping/text watermarking of images), and thanks to the wonders of
PHPDocumentor there is even an
API documentation for those interested. To me, one of the coolest things about this code is it unifies a lot of very similar things (different image and font formats) into a single easy to use API -- something I thought was sorely missing from the GD extension as it stands.
As with all of my code I release I am more than happy to hear your feedback. Moreover, I'm just tickled with excitement if you find the time to improve on them by submitting patches. (Okay, not quite that excited -- I just hope someone out there finds it useful).