Web Analytics Made Easy -
StatCounter GD2 overlaying image with rounded (transparent) corners - CodingForum


No announcement yet.

GD2 overlaying image with rounded (transparent) corners

  • Filter
  • Time
  • Show
Clear All
new posts

  • GD2 overlaying image with rounded (transparent) corners

    After a few hours of testing & failing, I'm at a blank and need some help.

    I have a script which uses GD to resize a series of images. Next to that it must overlay a small image in the bottom right corner, a watermark.

    The problem is that the image I need to overlay, has rounded corners (check attachment). Simply overlaying the image will make those transparent parts (space where the corner is rounded) black, while I need it to stay transparent. Using a transparency pct will make the whole image transparent, which I do not need because I only need it to be transparent on the corners.

    Could someone please help me because I'm all out of ideas.
    Attached Files

  • #2
    I already found a solution to my problem. I was using imagecopymerge while I had to use imagecopy. An example: http://rs.bahneman.com/wm.php.html . Hope it helps someone in the future!