Image watermark with PHP
Steps: 1. Load both images 2. Get size of both images 3. Copy watermark to main image 4. Print image to screen PHP functions: imagecreatefromgif imagecreatefromjpeg getimagesize imagecopymerge header imagejpeg imagedestroy Watermark image: Main image: <?php $main_img = "Happy_valentines_day.jpg"; // main big photo / picture $watermark_img = "watermark.gif"; // use GIF or PNG, JPEG has no tranparency support $padding = 3; // distance to border in pixels for watermark image $opacity = 100; // image opacity for transparent watermark $watermark = imagecreatefromgif($watermark_img); // create watermark $image = imagecreatefromjpeg($main_img); // create main graphic if(!$image || !$watermark) die("Error: main image or watermark could not be loaded!"); $watermark_size = getimagesize($watermark_img); $watermark_width = $watermark_size[0]; $watermark_height = $watermark_size[1]; $image_size = getimagesize($main_img); $dest_x = $imag...