I have two photos already in server, trying to use one for WATERMARK..
I am using the below script:
<?php
$watermark = "../images/watermark/watermark.gif";
$image = "../images/mainphoto.gif";
$padding = 0;
$opacity = 100;
$watermark_size = getimagesize($watermark);
$watermark_width = $watermark_size[0];
$watermark_height = $watermark_size[1];
$image_size = getimagesize($image);
$dest_x = $image_size[0] - $watermark_width - $padding;
$dest_y = $image_size[1] - $watermark_height - $padding;
if(!$image || !$watermark) die("Error: main image or watermark could not be loaded!");
imagecopymerge($image, $watermark, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height, $opacity);
?>
I am getting the following error:
Warning: imagecopymerge() expects parameter 1 to be resource, string given in /home/neatbuz/public_html/asite_service/inc_watermark.php on line 26
please help..