phpQuestioner Posted November 7, 2007 Share Posted November 7, 2007 Ok - So I have a script that watermarks an image; it adds a transparent gif over my base image. I also have a script to resize my image. But here is where the problem comes in; these are two different scripts - none of the code will interconnect (variable wise - that is), so I am having a problem trying to piece together a PHP GD Image code that will create a watermark and will then be resized. Below is my code for resizing my image, but from there - I know I need to use imagecreategif somewhere and imagecopy somewhere; but where, I do not know. <?php $pw = $_GET['pw']; $ph = $_GET['ph']; $percent1 = $pw; $percent2 = $ph; // Content type header('Content-type: image/jpeg'); // Get new sizes list($width, $height) = getimagesize($filename); $newwidth = $width - $percent1; $newheight = $height - $percent2; // Load $thumb = imagecreatetruecolor($newwidth, $newheight); $source = imagecreatefromjpeg($filename); // Resize imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height); // Output imagejpeg($thumb); ?> Link to comment https://forums.phpfreaks.com/topic/76344-creating-watermark-with-another-image-resizing-watermarked-image/ Share on other sites More sharing options...
joma Posted December 17, 2007 Share Posted December 17, 2007 what was your outcome to this ??? Link to comment https://forums.phpfreaks.com/topic/76344-creating-watermark-with-another-image-resizing-watermarked-image/#findComment-416695 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.