PHP: How to make a green area (background) in an image transparent?

前端 未结 2 1333
清酒与你
清酒与你 2021-01-27 03:40

I\'m new here on Stackoverflow.

I would very much like figure out if it\'s possible to make a specific color of an image transparent using a PHP script. And if it is, ho

2条回答
  •  独厮守ぢ
    2021-01-27 04:18

    imagecolortransparent() will help you:

    ...
    $yourColor = imagecolorallocate($im, 0, 0, 0);
    imagecolortransparent($im, $yourColor);
    ...
    

提交回复
热议问题