PHP crop image in shape other than square like oval shape or round

北城以北 提交于 2019-12-10 17:12:11

问题


I want to crop images in PHP. Cropping in rectangular shape is all common and easy to do. Can you guide me that how i can crop image in shape other than square like in oval or round shape.


回答1:


You can actually do that with ImageMagick ... See Crop or mask an image into a circle and Crop image into circle and add border for good examples




回答2:


In addition to the previous answer, you can even blur the border with Image Magick's vignette effect, look for vignetteImage method.



来源:https://stackoverflow.com/questions/10071222/php-crop-image-in-shape-other-than-square-like-oval-shape-or-round

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