November 4, 201213 yr Hi all, i have written a simple php script to resize images from csv file and watermark them, the problem is if the watermark is a transparent png then all of the background is transparent not just the image, so if the backgroundcolour is blue then i get a blue rectangle with the watermark text, any ideas //watermark $logoImage = "$watermarkRoute"; $logoExtension = strtolower(substr(strrchr($logoImage,'.'),1)); if($logoExtension == "jpg") { $logo = imagecreatefromjpeg($logoImage); } if($logoExtension == "png") { $logo = imagecreatefrompng($logoImage); } $watermarkImageWidth_src = imagesx($logo); $watermarkImageheight_src = imagesy($logo); imagecopy($img, $logo, 20, 20, 0, 0, $watermarkImageWidth_src, $watermarkImageheight_src); Thanks
Create an account or sign in to comment