acctman Posted April 1, 2009 Share Posted April 1, 2009 1. use a transparent watermark.png (img that says domain name) if this can be done with a .ttf font that would be end better. 2. main.jpg get image size and then resize watermark.png by 25% if file main.jpg is less than 500x500 (will i lose transparancey if i resize?) 3. add transparent watermark.png to the center of main.jpg 4. save file as main_water.jpg Link to comment https://forums.phpfreaks.com/topic/152115-php-gd-watermark-help-needed/ Share on other sites More sharing options...
acctman Posted April 1, 2009 Author Share Posted April 1, 2009 this is some example coding i've found so far if ($perform_watermark == true) { $watermark = imagecreatefrompng($watermark_image); imagealphablending($watermark, false); imagesavealpha($watermark, true); $watermark_width = imagesx($watermark); $watermark_height = imagesy($watermark); // Position Overlay in Bottom Right $dest_x = imagesx($newim) - $watermark_width; $dest_y = imagesy($newim) - $watermark_height; imagecopy($newim, $watermark, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height); imagedestroy($watermark); } Link to comment https://forums.phpfreaks.com/topic/152115-php-gd-watermark-help-needed/#findComment-798961 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.