This PHP script is to creat thumbnails of JPG, PNG, and GIP images. It requires PHP incl. GD library and optionally ImageMagick and MySQl. Thumbnails are cached to increase performance.
If ImageMagick is installed, thumbnails will be created with ImageMagick because of the better quality. (Note: This script uses a system call for ImageMagick - this will not work in PHP safe mode!) If ImageMagick is not available, the GD library will be used instead. Please note that some GD versions don't support GIF images, and others don't support JPG images, so ImageMagick should always be the better choice.
Basically, the thumbnail type will be the same like the original, i.e. JPG images create JPG thumbnails, PNG images create PNG thumbnails, and GIF images create GIF thumbnails. If however ImageMagick is used, GIF images will always create PNG thumbnails. Same goes for GD libraries without GIF write-support.
Transparency of GIF and PNG images should be preserved in thumbnails.
- PHP 4.0 or Higher