本文整理汇总了Python中Image.blend方法的典型用法代码示例。如果您正苦于以下问题:Python Image.blend方法的具体用法?Python Image.blend怎么用?Python Image.blend使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Image
的用法示例。
在下文中一共展示了Image.blend方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: logical_xor
# 需要导入模块: import Image [as 别名]
# 或者: from Image import blend [as 别名]
def logical_xor(image1, image2):
"Logical xor between two images"
image1.load()
image2.load()
return image1._new(image1.im.chop_xor(image2.im))
##
# Blend images using constant transparency weight.
# <p>
# Same as the <b>blend</b> function in the <b>Image</b> module.
示例2: blend
# 需要导入模块: import Image [as 别名]
# 或者: from Image import blend [as 别名]
def blend(image1, image2, alpha):
"Blend two images using a constant transparency weight"
return Image.blend(image1, image2, alpha)
##
# Create composite using transparency mask.
# <p>
# Same as the <b>composite</b> function in the <b>Image</b> module.
示例3: enhance
# 需要导入模块: import Image [as 别名]
# 或者: from Image import blend [as 别名]
def enhance(self, factor):
return Image.blend(self.degenerate, self.image, factor)
##
# Color enhancement object.
# <p>
# This class can be used to adjust the colour balance of an image, in
# a manner similar to the controls on a colour TV set. An enhancement
# factor of 0.0 gives a black and white image, a factor of 1.0 gives
# the original image.