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.