Login   Register  
PHP Classes
elePHPant
Icontem

File: test.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Lionel Micault  >  Transparent Watermark  >  test.php  >  Download  
File: test.php
Role: Example script
Content type: text/plain
Description: test source
Class: Transparent Watermark
Apply a transparent watermark to protect images
Author: By
Last change:
Date: 10 years ago
Size: 635 bytes
 

Contents

Class file image Download
<?
include_once("transparentWatermark.inc");

//set file names
$logo="testlogo.png";
$image="testimage.jpg";
$markedImage="marked".$image;

//no compute new watermark on same image
if (!file_exists($markedImage) ) {
    
    
// open classe with logo
    
$WM=new  transparentWatermark($logo);
    
    
// set logo's position (optional)
    
$WM->setStampPosition transparentWatermarkOnRighttransparentWatermarkOnBottom);
    
    
// create new image with logo
    
if (!$WM->markImageFile $image$markedImage)) 
        die(
"Error:".$WM->getLastErrror()."\r\n");
}

// redirection to watermarked image
header("Location: $markedImage");
?>