魔杖 sepia_tone()函数– Python
sepia_tone()模拟老式银基化学摄影印刷。 sepia_tone()函数将棕褐色色调应用于图像。
Syntax :
Parameters :
Parameter | Input Type | Description |
---|---|---|
threshold | numbers.Real | The extent of the toning. Value can be between 0 & quantum_range, or 0 & 1.0. Default value is 0.8 or “80%”. |
源图像:
示例 1:
wand.image.sepia_tone(threshold)
输出:
示例 2:增加阈值。
# Import Image from wand.image module
from wand.image import Image
# Read image using Image function
with Image(filename ="koala.jpeg") as img:
# Sepia simulation using sepia_tone() function
img.sepia_tone(threshold = 0.6)
img.save(filename ="sepiakoala2.jpeg")
输出: