Wand implode()函数– Python
implode()生成一种扭曲的图像,其中拉动效应被注意到到图像的中间。数量参数控制向中心拉的像素范围。
Syntax :
Parameters :
Parameter | Input Type | Description |
---|---|---|
amount | numbers.Real | Normalized degree of effect between 0.0 & 1.0./td> |
method | basestring | Which interpolate method to apply to effected pixels. |
源图像:
示例 1:
wand.image.implode(amount, method)
输出:
示例 2:
增加金额值
# Import Image from wand.image module
from wand.image import Image
# Read image using Image function
with Image(filename ="koala.jpeg") as img:
# imploded image using implode() function
img.implode(amount = 0.35)
img.save(filename ="impkoala.jpeg")
输出: