本文整理汇总了Python中wand.image.Image.negate方法的典型用法代码示例。如果您正苦于以下问题:Python Image.negate方法的具体用法?Python Image.negate怎么用?Python Image.negate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wand.image.Image
的用法示例。
在下文中一共展示了Image.negate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Image
# 需要导入模块: from wand.image import Image [as 别名]
# 或者: from wand.image.Image import negate [as 别名]
fiveSpecialDigit = Image(filename='5tb.png')
imagesColored = []
imagesColored.append(Image(filename='0m.png'))
imagesColored.append(Image(filename='1m.png'))
imagesColored.append(Image(filename='2m.png'))
imagesColored.append(Image(filename='3m.png'))
imagesColored.append(Image(filename='4m.png'))
imagesColored.append(Image(filename='5m.png'))
imagesColored.append(Image(filename='6m.png'))
imagesColored.append(Image(filename='7m.png'))
# Read in the input image ... i.e., the B&W octal page.
img = Image(filename=backgroundImage)
if invert:
img.negate()
backgroundWidth = img.width
backgroundHeight = img.height
if swapColors:
print 'Swapping colors'
for i in range(0, 8):
replaceColorsInImage(images[i], Color(matchColor), Color(scanColor))
replaceColorsInImage(img, Color(scanColor), Color(matchColor))
# Make certain conversions on the background image.
img.type = 'truecolor'
img.alpha_channel = 'activate'
# Determine the range of binsource lines we need to use. We're guaranteed
# they're all in the binsource lines[] array.