I have script that add water mark (PNG, transparent) to image(JPG). Works fine with a catch - in some way water mark changes colors and makes it NOT transparent. This is code i use for adding water mark:
$im = imagecreatefromjpeg( ../../pics/ .$ran. _large.jpg );
$stamp = imagecreatefrompng( a.png );
$marge_right = 10;
$marge_bottom = 10;
$sx = imagesx($stamp);
$sy = imagesy($stamp);
imagecopymerge($im, $stamp, imagesx($im) - $sx - $marge_right, imagesy($im) - $sy - $marge_bottom, 0, 0, imagesx($stamp), imagesy($stamp), 70);
// Save the image to file and free memory
imagejpeg($im, ../../pics/ .$ran. _large.jpg );
imagedestroy($im);
http://i39.tinypic.com/20iuwk7.jpg”rel=“nofollow> 带水面的图像在PHP生成(重)。