New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
How do i make watermark to image using image URL ?
How do i make watermark to image using image URL ?
Example - Check this link -
http://www.vatapita.com/hivtube.com/img-gen/index.php?source=http://i.imgur.com/t15trGU.jpg
Image Link - http://i.imgur.com/t15trGU.jpg
Script - http://www.vatapita.com/hivtube.com/img-gen/index.php?source=( My Image Link )

Comments
http://php.net/manual/en/image.examples-watermark.php
How i make this script like above ? im a beginner
Please tell me step by step..Please
Sure. I'll teach you step by step. $50/hour though. Please
<?php // Load the stamp and the photo to apply the watermark to $stamp = imagecreatefrompng('stamp.png'); if (!filter_var($_GET['source'], FILTER_VALIDATE_URL)) { exit('invalid source URL'); } $source = file_get_contents($_GET['source']); $im = imagecreatefromstring($source); // Set the margins for the stamp and get the height/width of the stamp image $marge_right = 10; $marge_bottom = 10; $sx = imagesx($stamp); $sy = imagesy($stamp); // Copy the stamp image onto our photo using the margin offsets and the photo // width to calculate positioning of the stamp. imagecopy($im, $stamp, imagesx($im) - $sx - $marge_right, imagesy($im) - $sy - $marge_bottom, 0, 0, imagesx($stamp), imagesy($stamp)); // Output and free memory header('Content-type: image/png'); imagepng($im); imagedestroy($im); ?>Of course, you want to amend
$marge_right(amount of pixels from the right) and$marge_bottom(amount of pixels from the bottom) to adjust where the stamp is displayed on the page.You can even make the watermark transluscent. Nice!
http://php.net/manual/en/image.examples.merged-watermark.php