Categories


Loading feed
Loading feed
Loading feed

Cool Image Thumbnail Class


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.

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.

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

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

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

=C=

Comments


Tuesday, August 29, 2006
GOOD TIMING!
7:15AM PDT · andrewfreiday
Wednesday, August 30, 2006
COOL :D
6:39AM PDT · octavian82
Thursday, August 31, 2006
VERY OOP-UNCOOL CLASS
8:26PM PDT · felixdd
Tuesday, November 14, 2006
NEW VERSION RELEASED
5:34AM PST · Ian Selby - www.gen-x-design.com [unregistered]