PHP Classes

Transparent Watermark: Apply a transparent watermark to protect images

Recommend this page to a friend!
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 60%Total: 8,420 All time: 195 This week: 310Down
Version License Categories
transparentwatermark 1.0.0Free for non-comm...Graphics, Security


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.

Innovation Award
PHP Programming Innovation award nominee
April 2004
Number 5

Prize: One copy of DWeb Pro Lifetime License
There are many sites that publish content that is mainly based on photos that they have been taken or acquired from somebody that took them.

Unfortunately there are also unscrupulous people that steal the photos from those sites and publish in other sites as if they where the ones that originally obtained the pictures, thus gaining undeserved credit and audience.

One way to prevent stealing sites to gain undue credit, is to put a mark of origin in the photos that is hard to remove.

This class provides a solution for processing picture by placing a transparent watermark that not only identifies the real origin of the picture, it can also make it difficult to remove such mark with the usual image processing tools.

Manuel Lemos
Picture of Lionel Micault
Name: Lionel Micault <contact>
Classes: 1 package by
Country: France France
Age: ???
All time rank: 30519 in France France
Week rank: 346 Down12 in France France Up
Innovation award
Innovation award
Nominee: 1x

transparentWatermark class v 1.01 This classe inserts watermark in image with transparent and randomize effects. It protects image rights and avoid watermark clearing with softwares. Constructor may have one parameter : name of stamp image. This file must be a JPEG or PNG image. setStamp( filename) method is used to set or change stamp image. markImageFile ( image1, image2) method is used to apply stamp on image1. If image2 is set, result is saved in image2, else result is printed to stdout with mime-type. markImage ( imageResource) method is used to apply stamp on image resource created by imagecreate(), imagecreatefromjpeg(), imagecreatefrompng(), ... setStampPosition ( X, Y) method is used to set stamp position on image. X possible values are transparentWatermarkOnLeft, transparentWatermarkOnCenter and transparentWatermarkOnRight, Y possible values are transparentWatermarkOnTop, transparentWatermarkOnMiddle and transparentWatermarkOnBottom NOTES: It's IMPORTANT to save result of watermaks on disk: it's easy to retrieve an image from different versions of watermark by pixel color averages. Transparent color is grey (#RGB=#808080) transparentWatermark class uses GD library .
  Files folder image Files  
File Role Description
Accessible without login Plain text file readme.txt Doc. readme file
Accessible without login Plain text file test.php Example test source
Plain text file Class class file

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:195
This week:310Down
 User Ratings  
 All time