我想用PIL/枕头对两个图像执行OR操作。目前我正在做这样的事情:
def image_union(figure1, figure2):
image1 = Image.open(figure1.visualFilename)
image2 = Image.open(figure2.visualFilename)
blended = Image.blend(image1, image2, .5)
output = ImageOps.grayscale(blended)
output.save('out-' + figure1.name + '-' + figure2.name + '.png')
return blended
我想要这两张照片:
但是上面的操作会返回以下结果,而我希望附着在恒星上的两个底部圆是完全黑色的:
使用^{} 代替
Image.blend
。在相关问题 更多 >
编程相关推荐