yepster123 Posted September 8, 2007 Share Posted September 8, 2007 Whats am i doing wrong with script, i dont think the script is wrong as its from a reliable site. But it comes up with the errors: <br /> <b>Warning</b>: imagecopymerge(): supplied argument is not a valid Image resource in <b>/home/content/m/a/n/manage23/html/soup.php</b> on line <b>13</b><br /> <br /> <b>Warning</b>: imagejpeg(): supplied argument is not a valid Image resource in <b>/home/content/m/a/n/manage23/html/soup.php</b> on line <b>14</b><br /> <br /> <b>Warning</b>: imagedestroy(): supplied argument is not a valid Image resource in <b>/home/content/m/a/n/manage23/html/soup.php</b> on line <b>15</b><br /> Heres the code, what am i doing wrong. Have a play with it. For the get variable i use "C:\Users\Andy\Documents\enviro\look.jpg" <?php header('content-type: image/jpeg'); $watermark = imagecreatefrompng('watermark.png'); $watermark_width = imagesx($watermark); $watermark_height = imagesy($watermark); $image = imagecreatetruecolor($watermark_width, $watermark_height); $image = imagecreatefromjpeg($_GET['src']); $size = getimagesize($_GET['src']); $dest_x = $size[0] - $watermark_width - 5; $dest_y = $size[1] - $watermark_height - 5; imagecopymerge($image, $watermark, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height, 100); imagejpeg($image); imagedestroy($image); imagedestroy($watermark); ?> Quote Link to comment https://forums.phpfreaks.com/topic/68526-what-am-doing-wrong-with-this-small-php-script-image-stamping-watermarking/ Share on other sites More sharing options...
BlueSkyIS Posted September 8, 2007 Share Posted September 8, 2007 what does the form look like? i wonder about $image = imagecreatefromjpeg($_GET['src']); what is src?? Quote Link to comment https://forums.phpfreaks.com/topic/68526-what-am-doing-wrong-with-this-small-php-script-image-stamping-watermarking/#findComment-344453 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.