PHP - Mask polygon over image

馋奶兔 提交于 2019-12-05 18:53:32

If you draw the polygon in black-white (and brey values between) on a different image (called mask), you can use applyMask of the WideImage library.

See: - http://wideimage.sourceforge.net/ - http://wideimage.sourceforge.net/wp-content/current/demo/index.php?demo=applyMask&output=preset%20for%20demo&colors=255&dither=&match_palette=

an alternative way would be to cut the big image in 4 parts ... a top part, left side and right side that are the parts on the left and right of the image afte the mask and bottom part and recompose them. But that would require a bit of code and calculations.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!