📜  魔杖阴影()函数- Python

📅  最后修改于: 2022-05-13 01:55:25.634000             🧑  作者: Mango

魔杖阴影()函数- Python

shadow()函数是Python Wand ImageMagick 库中的一个内置函数,用于生成图像阴影。

原图:

示例 1:

shadow(alpha, sigma, x, y)

输出:

示例 2:

# Import library from Image 
from wand.image import Image
  
# Import the image
with Image(filename ='../geeksforgeeks.png') as image:
    # Clone the image in order to process
    with image.clone() as shadow:
        # Invoke shadow function
        shadow.shadow(0.8, 0.2, 10, 40)
        # Save the image
        shadow.save(filename ='shadow1.jpg')

输出: