This is a class that can process an image on the fly by either generate a thumbnail, apply an watermark to the image, or resize it.
Autodetect GD 1 and GD 2, auto-fitting, scaling, calculate quality factor for a specific file size, suport bicubic resample algorithm.
The processed image can either be displayed in a page, saved to a file, or returned to a variable.
It requires the PHP with support for GD library extension in either version 1 or 2. If the GD library version 2 is available it the class can manipulate the images in true color, thus providing better quality of the results of resized images.
Features description:
- Thumbnail: normal thumbnail generation
- Auto-fitting: adjust the dimensions so that the resized image aspect is not distorted
- Scaling: enlarge and shrink the image
- Format: both JPEG and PNG are supported, but the watermark image can only be in PNG format as it needs to be transparent
- Autodetect the GD library version supported by PHP
- Calculate quality factor for a specific file size in JPEG format.
- Suport bicubic resample algorithm
This class is meant to process a given image by applying a watermark image that can serve as identifier of the origin of the image being processed.
The watermark image can have a color that is handled as transparent color, and can be applied with a variable opacity level within the range from 0% to 100%.
The watermark image can be applied in a fixed or a random position of the image to be process.
The original and the watermark images can be read in many formats, including GIF, JPEG, PNG, WBMP, XPM and XBM. The processed image can be generated in the formats GIF, JPEG and PNG.
This class can be use to resize and apply an watermark to an image.
The class can open an image file in the JPEG format, a watermark image in the PNG format, resize the original image to a a given size and apply the watermark image in a given position of the resized image.
The original and the resized images are stored in server files in the JPEG or PNG formats.
This class modifies a given image using an watermark graphic defined by another image.
This is meant to help protecting the sites that own the original images from being stollen by other people that remove the original credits and display the images in other sites without permission.
This class places the watermark image with a random displacement and color effects to difficult the effectiveness of watermark removal techniques.
Generating thumbnail images with logo or watermark
These classes are meant to generate thumbnail images or adding a logo or watermark to a picture.
There are also sub-classes for caching the generated images in files stored in a temporary folder. The generated images may be cached to avoid the need to process the pictures during a given period of time.