What seems to be simple, isn\'t :(
I\'m trying to add something like a watermark (transparent png) on an image (jpg). This is the code I\'m using:
$w
-
Your $width
and $height
should be the dimensions of the watermark, not of the photo. What you're telling it to do is copy the watermark with a much bigger size than it is. When it reads part of an image that doesn't exist (coordinates out of bounds) the result is opaque black, giving the result you see.
讨论(0)
-
Use imagecopymerge() instead of imagecopy()
U may also like imagesavealpha()
讨论(0)
- 热议问题