<?
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 ( transparentWatermarkOnRight, transparentWatermarkOnBottom);
// create new image with logo
if (!$WM->markImageFile ( $image, $markedImage))
die("Error:".$WM->getLastErrror()."\r\n");
}
// redirection to watermarked image
header("Location: $markedImage");
?>
|