Location: PHPKode > scripts > Thumbs-Up > readme.txt
======================================================================================================================
INTRODUCTION
======================================================================================================================
Use this script to create thumbnails of JPG, PNG, and GIF 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.

======================================================================================================================
LICENSE
======================================================================================================================
This script is freeware for non-commercial use. If you like it, please feel free to make a donation!
However, if you intend to use the script in a commercial project, please donate at least EUR 6.
You can make a donation on my website: http://www.gerd-tentler.de/tools/thumbsup/.

======================================================================================================================
USAGE
======================================================================================================================
You can use this script with images from a directory or with images from a MySQL database. Just insert the IMG-tags
with thumbsup.php and the required arguments where you want your thumbnails to appear (see examples below).

Images from a directory
-----------------------
Required arguments: image = path to image
Optional arguments: width = max. thumbnail width, height = max. thumbnail height, cache_dir = path to cache

Examples:

  <img src="thumbsup.php?image=images/example.jpg&width=200&height=250">
  <img src="thumbsup.php?image=images/example.jpg&width=200&height=250&cache_dir=images/cache">

Images from a MySQL database
----------------------------
Required arguments: database = database name, table = table name, field = field name, key = key name, id = record ID
Optional arguments: width = max. thumbnail width, height = max. thumbnail height, cache_dir = path to cache

Examples:

  <img src="thumbsup.php?database=mydb&table=mytable&field=image&key=ID&id=123&width=200&height=250">
  <img src="thumbsup.php?table=mydb.mytable&field=image&key=ID&id=123&width=200&height=250">

Please note: cache_dir must be readable + writable by PHP!

======================================================================================================================
Source code + examples available at http://www.gerd-tentler.de/tools/thumbsup/.
======================================================================================================================
Return current item: Thumbs-Up