Cool Image Thumbnail Class

      4 Comments on Cool Image Thumbnail Class

p. Back in May, GenXDesign, released their “PHP Thumbnail Class”: Ok, so it’s not exactly “hot” news, it’s still an interesting piece of code.

p. I’ve seen a lot of implementations of thumb nail functionality in PHP, I’ve even written a couple of my own. I like this class thought. In looking over the code the first thing you notice is that it’s clean code. I don’t mean they use the latest whiz-bang method to cshave a few keystrokes. This code is simple, nicely formatted and easy to read through. My only real problem with the code itself is that it is not terribly well documented. That can be forgiven since easy to read.

p. !>! The class itself has everything you need to create thumbnails.

* Works with gif,jpg, and png images
* Ability to resize by percentage, width, or height
* Ability to set quality of jpg images (0-100%)
* Ability to create a square crop of the image from any point
* Ability to perform multiple manipulations and saves without re-initializing class, or reloading original image
* Ability to display manipulated image on the fly, enabling dynamic image generation in your scripts

p. They even have a “demo page”: with several samples, including the cute little fellow on the right.

p. The class is available in 2 flavors, PHP 4 and PHP 5. It is licensed under the MIT license.

p. =C=