当前位置: 首页>>代码示例>>Python>>正文


Python Image.negate方法代码示例

本文整理汇总了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.
开发者ID:avtobiff,项目名称:virtualagc,代码行数:33,代码来源:ProoferBox.py


注:本文中的wand.image.Image.negate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。