0

运行这个简单的例子:

with Color('#f00') as red:
    print red
    print red.red_int8, red.green_int8, red.blue_int8

第一张印刷品srgb(255,0,0)如我所料。对于我希望得到的第二张打印件,255 0 0但它实际上打印了0 0 0.

至少文档指出:

blue_int8

(numbers.Integral) Blue as 8bit integer which is a common style. From 0 to 255.

这可能是一个错误还是我在这里做错了什么?

编辑 用 Python3(以上是 Python2.7)再次尝试,结果是一样的:

Python 3.4.2 (default, Oct  8 2014, 13:44:52) 
[GCC 4.9.1 20140903 (prerelease)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from wand.color import Color
>>> x = Color('#f00')
>>> x.red
1.0
>>> x.blue
0.0
>>> x.green
0.0
>>> x.red_int8
0
>>> x.blue_int8 
0 
>>> x.green_int8
0
>>>

版本:

$ python2.7 -m wand.version --verbose
Wand 0.3.8
ImageMagick 6.9.0-0 Q16 x86_64 2014-11-17 http://www.imagemagick.org
4

0 回答 0