Arkadaşlar watermark için çok sayıda error alıyorum. Çalışıyor ama error.log dosyam dolup taşıyor. Nedeni ne olabilir?
Kullandığım watermark dosyası.
Error log dosyası
Kullandığım watermark dosyası.
PHP:
<?php
/*
* This script places a watermark on a given jpeg, png or gif image.
*
* Use the script as follows in your HTML code:
* <img src="watermark.php?image=image.jpg&watermark=watermark.png" />
*
* Visit http://www.htmlguard.com for more great scripts!
*/
// loads a png, jpeg or gif image from the given file name
function imagecreatefromfile($image_path) {
// retrieve the type of the provided image file
list($width, $height, $image_type) = getimagesize($image_path);
// select the appropriate imagecreatefrom* function based on the determined
// image type
switch ($image_type)
{
case IMAGETYPE_GIF: return imagecreatefromgif($image_path); break;
case IMAGETYPE_JPEG: return imagecreatefromjpeg($image_path); break;
case IMAGETYPE_PNG: return imagecreatefrompng($image_path); break;
default: return ''; break;
}
}
// load source image to memory
$image = imagecreatefromfile($_GET['image']);
if (!$image) die('Unable to open image');
// load watermark to memory
$watermark = imagecreatefromfile($_GET['watermark']);
if (!$image) die('Unable to open watermark');
// calculate the position of the watermark in the output image (the
// watermark shall be placed in the lower right corner)
$watermark_pos_x = imagesx($image) - imagesx($watermark) - 8;
$watermark_pos_y = imagesy($image) - imagesy($watermark) - 1;
// merge the source image and the watermark
imagecopy($image, $watermark, $watermark_pos_x, $watermark_pos_y, 0, 0,
imagesx($watermark), imagesy($watermark));
// output watermarked image to browser
header('Content-Type: image/jpeg');
imagejpeg($image, '', 100); // use best image quality (100)
// remove the images from memory
imagedestroy($image);
imagedestroy($watermark);
?>
Error log dosyası
PHP:
PHP Warning: getimagesize(deneme/deneme1/185a0b9b737cd1fa44991b6c77a.jpg) [<a href='function.getimagesize'>function.getimagesize</a>]: failed to open stream: No such file or directory in /home/gamertest/public_html/watermark.php on line 15
PHP Warning: getimagesize(3d2b5d33cd41c31bc23004ae11a.jpg) [<a href='function.getimagesize'>function.getimagesize</a>]: failed to open stream: No such file or directory in /home/gamertest/public_html/watermark.php on line 15
PHP Warning: getimagesize(deneme/deneme1/185a0b9b737cd14a44991b6c77a.jpg) [<a href='function.getimagesize'>function.getimagesize</a>]: failed to open stream: No such file or directory in /home/gamertest/public_html/watermark.php on line 15