PHP Classes
elePHPant
Icontem

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    
Last Updated Ratings Unique User Downloads Download Rankings
2004-04-16 (12 years ago) RSS 2.0 feedStarStarStarStar 60%Total: 8,401 All time: 187 This week: 1,123Down
Version License Categories
transparentwatermark 1.0.0Free for non-comm...Graphics, Security
Description Author

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
Innovation award
Innovation award
Nominee: 1x

Details
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 transparentWatermark.inc Class class file

 Version Control Unique User Downloads Download Rankings  
 0%
Total:8,401
This week:0
All time:187
This week:1,123Down
 User Ratings  
 
 All time
Utility:77%StarStarStarStar
Consistency:77%StarStarStarStar
Documentation:66%StarStarStarStar
Examples:73%StarStarStarStar
Tests:-
Videos:-
Overall:60%StarStarStarStar
Rank:1095