ImageMagick circular dstortion on iOS

旧城冷巷雨未停 提交于 2020-01-06 14:54:14

问题


I am working on an iOS project which uses ImageMagick. I wonder if it is possible to perform some circular distortions on an image, but not on the center of the image, rather in a point (x,y) and of a given radius R.

Any (constructive) responses are well appreciated.

Many thanks


回答1:


If ImageMagick doesn't directly support doing a circular distortion at non-origin, you might want to pass in a sequence of commands to: a) add appropriate border to the image, b) do a circular distortion, c) get rid of the border added in (a). The size of the border is such that it effectively shifts the distortion origin to the desired place in the original image.



来源:https://stackoverflow.com/questions/8172512/imagemagick-circular-dstortion-on-ios

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