[英]How can I achieve a photoshop “bevel / emboss” like depth effect using Python?
我想将图像放在背景图像的顶部,并使用 Python 在图像上应用“斜面/浮雕”效果。 我尝试使用 PIL 库,但也欢迎对其他库提出建议。
它应该是这样的:
我有以下代码:
from PIL import Image
from PIL import ImageFilter
img = Image.open('./image.jpeg', 'r')
# this doesn't do what I want...
img = img .filter(ImageFilter.EMBOSS)
background = Image.open('./bg.png', 'r')
background.paste(img)
我使用 Affinity Photo 作为示例图像。 在 Photoshop 中应该几乎相同。 以下是我使用的设置:
我仍然不知道如何在 python 中做到这一点,但我找到了一种方法,结合使用批处理作业和 Affinity Photo 中的宏功能。
此处描述了如何启动批处理作业: http : //www.millermattson.com/blog/batch-processing-with-affinity-photo/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.