Using GD in PHP, how can I make a transparent PNG watermark on PNG and GIF files ? (JPG files work fine)

前端 未结 1 1282
南方客
南方客 2021-01-04 23:51

I have an image (let\'s call it original image) on which I want to watermark another image (let\'s call it logo).
The logo is a transparent PN

相关标签:
1条回答
  • 2021-01-05 00:50

    imagecopy does not support using two images with alpha channels. take a look at imagecopymerge.

    http://php.net/manual/en/function.imagecopymerge.php

    There are plenty examples in the user comments sections, and a finished implementation for what you want:

    http://www.php.net/manual/en/function.imagecopymerge.php#92787

    0 讨论(0)
提交回复
热议问题