开发者

PNG custom shape with PHP imagemagik or GD2

开发者 https://www.devze.com 2023-03-22 03:32 出处:网络
Is it possible to make a transparent png image with php that has custom shape? For example, I\'ve got a jpg image at server. Using php imagemagik or GD2 I would like to save it as transparent png and

Is it possible to make a transparent png image with php that has custom shape? For example, I've got a jpg image at server. Using php imagemagik or GD2 I would like to save it as transparent png and the transparency is custom shape. I hope it开发者_StackOverflow中文版's clear. If it's not I will send an example.

Regards, Dave


Umm it is possible to make it transparent, basically you can set a color as transparent, and the library will make each matching pixel transparent. I'm not sure what you mean by the shape though.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号