Showing posts with label watermark. Show all posts
Showing posts with label watermark. Show all posts

Wednesday, June 8, 2016

Thumbnail and Watermark On The Fly

Sometimes we may want to create thumbnails and/or watermark on-the-fly for images on our web sites instead of creating offline by using some tools or image editors. We want to generate it automatically from our php scripts. Thus, we can use thumbnail class made by Emilio Rodriguez  and we can download it from phpclass.org or from here (including an example file 7kb).

/**
*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.
*
* 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
* - Watermark: Text or image in PNG format. Suport multiples positions.
* - 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
* - Tested: PHP 4 valid
*
* @package Thumbnail and Watermark Class
* @author Emilio Rodriguez
* @version 1.48 <2005/07/18>
* @copyright GNU General Public License (GPL)
**/



Wednesday, May 4, 2016

Watermark Image PHP Script Create A Watermark Image In PHP Using Another Image

The php script will watermark image using another image. A simple approach to put your company logo or copyright notice on the image, thus protect it from stealing.

Package contains example for watermarking all the jpg images in a folder. Can be easily changed to process gif and png images.

How to use:

  • Unpack php  files, and save them on the server where you have images for watermarking.
  • Update watermark_image_example.php to match your requirements: set images folder and watermarked images folder.
  • Open the file in browser, and it will generate watermarked images according to your settings.
Download Watermark Image PHP Script