【发布时间】:2017-07-24 18:19:42
【问题描述】:
我有问题。以下代码确实有效,它结合了两个图像。但是最终合成中的背景图像是完全黑色的。
大家猜一猜,这里有什么问题?
from wand.image import Image
with Image(filename=bgimage) as back:
with Image(filename=qrcode) as front:
with Image(width=back.width, height=back.height) as new_image:
new_image.composite(front, left=1000, top=900)
new_image.save(filename=qr_output)
【问题讨论】:
-
new_image的背景定义为“无”,因此最终图像应该有黑色背景。你在期待什么?
标签: python imagemagick wand magickwand