This class can be used to generate image thumbnails.
It can use either the PHP GD library functions or the ImageMagick program.
The class generates thumbnail images with a size proportional to the original image.
If the original image is smaller than the target thumbnail size, the class may optionally enlarge the original image.
The empty spaces around the rescaled image can be optionally filled with a background color.
The rescaled image can be stored in a server side file or served as the current script output.
The class can store the thumbnail images in cache files to avoid thumbnail image generation overhead when the thumbnail images are generated with the same size.
When using GD library functions, the class checks the available memory to prevent thumbnail image generation errors.
When an error occurs, the class displays the error message within the generated image.