Python – Wand 中的 blue_shift()函数
蓝移效果通过将蓝色值移动一个因子使颜色变暗。使用它生成夜间类型的场景。这只需要一个参数factor 。许多照片编辑器使用此效果为图像提供夜间曝光效果。
Syntax :
Parameters :
Parameter | Input Type | Description |
---|---|---|
factor | numbers.Real | Amount to adjust values. |
源图像:
示例 1:
wand.image.blue_shift(factor)
输出:
示例 2:将 factor 的值增加到 1.5 。
# Import Image from wand.image module
from wand.image import Image
# Read image using Image function
with Image(filename ="koala.jpeg") as img:
# Blueshift effect using blue_shift() function
img.blue_shift(factor = 1.25)
img.save(filename ="bs_koala.jpeg")
输出: