I have a directory that holds all my uploaded image and am trying to figure out how to create watermarks when people wish to view em. Is there a way to add a watermark to evfery image once it is uploaded?
I tried to follow http://www.sitepoint.com/article/watermark-images-php but got confused as I'm basically a retard with a web site.
The code is on that website! As a starting point you need to define watermark.png and src
$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 - $watermark_width - 5;
$dest_y = $size - $watermark_height - 5;
imagecopymerge($image, $watermark, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height, 100);
At last.. I can make my text bold
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)