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


Python Image.pixelColor方法代码示例

本文整理汇总了Python中PythonMagick.Image.pixelColor方法的典型用法代码示例。如果您正苦于以下问题:Python Image.pixelColor方法的具体用法?Python Image.pixelColor怎么用?Python Image.pixelColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PythonMagick.Image的用法示例。


在下文中一共展示了Image.pixelColor方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: range

# 需要导入模块: from PythonMagick import Image [as 别名]
# 或者: from PythonMagick.Image import pixelColor [as 别名]
from PythonMagick import Image
photo=Image("9x9", "#E65C00")
x=y=0
for i in range(1,7):
    photo.pixelColor(4,i,'#0404B4')
for i in range(3,6):
    photo.pixelColor(i,2,'#0404B4')
for i in range(2,7):
    photo.pixelColor(i,3,'#0404B4')
for i in range(2,7):
    photo.pixelColor(i,0,'#0404B4')
for i in range(3,6):
    photo.pixelColor(i,7,'#0404B4')
for i in range(2,5):
    photo.pixelColor(8,i,'#0404B4')
for i in range(2,5):
    photo.pixelColor(0,i,'#0404B4')
for i in range(5,7):
    photo.pixelColor(i/3,i,'#0404B4')
photo.pixelColor(1,1, '#0404B4')
photo.pixelColor(7,1, '#0404B4')
photo.pixelColor(7,5, '#0404B4')
photo.pixelColor(6,6, '#0404B4')

photo.scale("200x200")
photo.write("238.png")
开发者ID:reinispro,项目名称:datormaciba2014-2015,代码行数:28,代码来源:238.py

示例2: Image

# 需要导入模块: from PythonMagick import Image [as 别名]
# 或者: from PythonMagick.Image import pixelColor [as 别名]
from PythonMagick import Image
bilde = Image("16x16", "#00FFFF")
x=y=0
for a in range(0,5):
    bilde.pixelColor(a,8,"#FFFF00")
for a in range(11,16):
    bilde.pixelColor(a,8,"#FFFF00")
for a in range(6,11):
    bilde.pixelColor(5,a,"#FF0000")
for a in range(6,11):
    bilde.pixelColor(11,a,"#FF0000")
for a in range(5,12):
    bilde.pixelColor(a,6,"#FF0000")
for a in range(5,12):
    bilde.pixelColor(a,11,"#FF0000")
bilde.scale("200x200")
bilde.write("234.png")
开发者ID:reinispro,项目名称:datormaciba2014-2015,代码行数:19,代码来源:234.py

示例3: Image

# 需要导入模块: from PythonMagick import Image [as 别名]
# 或者: from PythonMagick.Image import pixelColor [as 别名]
from PythonMagick import Image
bilde = Image("16x16", "#FFFF00")
x=y=0
for a in range(0,5):
    bilde.pixelColor(8,a,"#FFFF00")
for a in range(11,16):
    bilde.pixelColor(8,a,"#FFFF00")
for a in range(6,10):
    bilde.pixelColor(a,5,"#00FFFF")
for a in range(6,10):
    bilde.pixelColor(a,11,"#00FFFF")
for a in range(5,12):
    bilde.pixelColor(6,a,"#00FFFF")
for a in range(5,12):
    bilde.pixelColor(10,a,"#00FFFF")
bilde.scale("200x200")
bilde.write("235.png")
开发者ID:reinispro,项目名称:datormaciba2014-2015,代码行数:19,代码来源:235.py

示例4: Image

# 需要导入模块: from PythonMagick import Image [as 别名]
# 或者: from PythonMagick.Image import pixelColor [as 别名]
# Fails: 2.uzdevums ieskaite
# Autors: Dmitrijs Doronins

from PythonMagick import Image

bilde = Image ("6x6",'white')

bilde.pixelColor( 1,1, "#48D1CC")

bilde.pixelColor( 2,1, "#3CB371")
bilde.pixelColor( 1,2, "#3CB371")

bilde.pixelColor( 3,1, "#9ACD32")
bilde.pixelColor( 2,2, "#9ACD32")
bilde.pixelColor( 1,3, "#9ACD32")

bilde.pixelColor( 4,1, 'yellow')
bilde.pixelColor( 3,2, 'yellow')
bilde.pixelColor( 2,3, 'yellow')
bilde.pixelColor( 1,4, 'yellow')

bilde.pixelColor( 5,1, "#FF8C00")
bilde.pixelColor( 4,2, "#FF8C00")
bilde.pixelColor( 3,3, "#FF8C00")
bilde.pixelColor( 2,4, "#FF8C00")
bilde.pixelColor( 1,5, "#FF8C00")

bilde.pixelColor( 5,2, "#FF4500")
bilde.pixelColor( 4,3, "#FF4500")
bilde.pixelColor( 3,4, "#FF4500")
bilde.pixelColor( 2,5, "#FF4500")
开发者ID:dmitriydoronin,项目名称:Dmitrij141REB169,代码行数:33,代码来源:2uzdevums.py

示例5: Image

# 需要导入模块: from PythonMagick import Image [as 别名]
# 或者: from PythonMagick.Image import pixelColor [as 别名]
#!/usr/bin/python
#programma uzziimee failaa 'burts_A.png' burtu 'A'

import numpy
from PythonMagick import Image

m = numpy.matrix([ \
[0,0,1,0,0], \
[0,1,0,1,0], \
[1,0,0,0,1], \
[1,0,0,0,1], \
[1,1,1,1,1], \
[1,0,0,0,1], \
[1,0,0,0,1], \
])
bilde = Image("5x7","#22aaff")

for i in range (0,5):
 for j in range (0,7):
  if(m[j,i]=1):
   bilde.pixelColor(i,j,"#FFF")
bilde.scale("200x200")
bilde.write("burts_A.png")
  
开发者ID:artosx,项目名称:xarab,代码行数:25,代码来源:pix.py

示例6:

# 需要导入模块: from PythonMagick import Image [as 别名]
# 或者: from PythonMagick.Image import pixelColor [as 别名]
#Fails 231.py
#Autors: Antons Kolesins
from PythonMagick import Image


bilde =Image("33x33", "#00FF00")

# Izveidojam mainigos x un y

#Uzstaada objekta 'bilde' x,y pixela kraasu

bilde.pixelColor( 1,2, "#eeff23")
bilde.pixelColor( 1,3, "#eeff23")
bilde.pixelColor( 1,4, "#eeff23")
bilde.pixelColor( 1,5, "#eeff23")
bilde.pixelColor( 2,1, "#eeff23")
bilde.pixelColor( 3,1, "#eeff23")
bilde.pixelColor( 4,1, "#eeff23")
bilde.pixelColor( 4,3, "#eeff23")
bilde.pixelColor( 5,5, "#eeff23")
bilde.pixelColor( 5,4, "#eeff23")
bilde.pixelColor( 5,3, "#eeff23")
bilde.pixelColor( 5,2, "#eeff23")
bilde.pixelColor( 2,3, "#eeff23")
bilde.pixelColor( 3,3, "#eeff23")



bilde.pixelColor( 7,1, "#eeff23")
bilde.pixelColor( 7,2, "#eeff23")
bilde.pixelColor( 7,3, "#eeff23")
开发者ID:AntonsKolesins,项目名称:antonkolesins187,代码行数:33,代码来源:233.py

示例7: Image

# 需要导入模块: from PythonMagick import Image [as 别名]
# 或者: from PythonMagick.Image import pixelColor [as 别名]
from PythonMagick import Image
bilde = Image("16x16", "#00FF33")
x=y=0
for a in range(0,7):
    bilde.pixelColor(a,8,"#FFFF66")
for a in range(9,16):
    bilde.pixelColor(a,8,"#FFFF66")
for a in range(6,11):
    bilde.pixelColor(9,a,"#000066")
for a in range(6,11):
    bilde.pixelColor(7,a,"#000066")
bilde.scale("200x200")
bilde.write("237.png")
开发者ID:reinispro,项目名称:datormaciba2014-2015,代码行数:15,代码来源:237.py

示例8: Image

# 需要导入模块: from PythonMagick import Image [as 别名]
# 或者: from PythonMagick.Image import pixelColor [as 别名]
#Fails 234.py
#Autors: Artis Erglis

from PythonMagick import Image

# Izgatavojam jaunu objektu - bilde
bilde = Image("16x16", "#A96969")

# Izgatavojam mainiigos x un y
x=y=0

for a in range(0,5):
    bilde.pixelColor(a,8,"#4C3AB6")
for a in range(11,16):
    bilde.pixelColor(a,8,"#4C3AB6")
for a in range(6,11):
    bilde.pixelColor(5,a,"#F9F113")
for a in range(6,11):
    bilde.pixelColor(11,a,"#F9F113")
for a in range(5,12):
    bilde.pixelColor(a,6,"#F9F113")
for a in range(5,12):
    bilde.pixelColor(a,11,"#F9F113")

# 3x3 pixels palielina liidz 200x200
bilde.scale("200x200")

# Objektu 'bilde' ieraksta failaa
bilde.write("234.png")
开发者ID:easydors,项目名称:datormaciba,代码行数:31,代码来源:234.py

示例9: Image

# 需要导入模块: from PythonMagick import Image [as 别名]
# 或者: from PythonMagick.Image import pixelColor [as 别名]
import numpy
from PythonMagick import Image
m = numpy.matrix([ \
[0,1,1,1,1,0], \
[0,0,0,0,1,0], \
[0,0,0,1,0,0], \
[0,0,1,0,0,0], \
[0,1,0,0,0,0], \
[0,1,1,1,1,0], \
])

bilde = Image ("6x6", "#FFF")
for i in range (0,6):
 for j in range (0,6):
  if(m[j,i]==1):
   bilde.pixelColor (i,j,"#FF4081")
bilde . scale ( "300x300" )
bilde . write ( "231.png" )
开发者ID:XREBC188,项目名称:X151REB188,代码行数:20,代码来源:LD23.py

示例10: range

# 需要导入模块: from PythonMagick import Image [as 别名]
# 或者: from PythonMagick.Image import pixelColor [as 别名]
from PythonMagick import Image
photo=Image("9x9", "#0404B4")
x=y=0
photo.pixelColor(2,3,'#04B404' )
photo.pixelColor(3,2,'#04B404' )
photo.pixelColor(4,1,'#04B404' )
photo.pixelColor(5,2,'#04B404' )
photo.pixelColor(6,3,'#04B404' )
photo.pixelColor(2,5,'#04B404' )
photo.pixelColor(3,4,'#04B404' )
photo.pixelColor(4,3,'#04B404' )
photo.pixelColor(5,4,'#04B404' )
photo.pixelColor(6,5,'#04B404' )
for i in range(2,7):
    photo.pixelColor(i,0,'#04B404')
for i in range(3,6):
    photo.pixelColor(i,7,'#04B404')
for i in range(2,5):
    photo.pixelColor(8,i,'#04B404')
for i in range(2,5):
    photo.pixelColor(0,i,'#04B404')
for i in range(5,7):
    photo.pixelColor(i/3,i,'#04B404')
photo.pixelColor(1,1, '#04B404')
photo.pixelColor(7,1, '#04B404')
photo.pixelColor(7,5, '#04B404')
photo.pixelColor(6,6, '#04B404')

photo.scale("200x200")
photo.write("239.png")
开发者ID:reinispro,项目名称:datormaciba2014-2015,代码行数:32,代码来源:239.py

示例11: Image

# 需要导入模块: from PythonMagick import Image [as 别名]
# 或者: from PythonMagick.Image import pixelColor [as 别名]
# Fails: 233.py
# Autors: Artis Erglis

from PythonMagick import Image

# Izgatavojam jaunu objektu - bilde
# Objekta izmeers 32x32 pixels
bilde = Image ( "32x32", "#22aaff" )

# Izgatavojam mainiigos x un y
x = y = 0

# Uzstaada objekta 'bolde' x,y pixela kraasu
bilde.pixelColor ( x,y, "#FFC0CB")

# 32x32 pixels palielina lidz 200x200
bilde.scale ( "200x200" )

# Objektu 'bilde' ieraksata failaa
bilde.write ( "233.png" )
开发者ID:easydors,项目名称:datormaciba,代码行数:22,代码来源:233.py

示例12: Image

# 需要导入模块: from PythonMagick import Image [as 别名]
# 或者: from PythonMagick.Image import pixelColor [as 别名]
# Fails 238.py
# Autors: Artis Erglis

from PythonMagick import Image

# Izgatavojam jaunu objektu - bilde
bilde= Image("9x9", "#E65555")

# Izgatavojam mainiigos x un y
x=y=0

for i in range(1,7):
    bilde.pixelColor(4,i,'#55E696')
for i in range(3,6):
    bilde.pixelColor(i,2,'#55E696')
for i in range(2,7):
    bilde.pixelColor(i,3,'#55E696')
for i in range(2,7):
    bilde.pixelColor(i,0,'#55E696')
for i in range(3,6):
    bilde.pixelColor(i,7,'#55E696')
for i in range(2,5):
    bilde.pixelColor(8,i,'#55E696')
for i in range(2,5):
    bilde.pixelColor(0,i,'#55E696')
for i in range(5,7):
    bilde.pixelColor(i/3,i,'#55E696')
bilde.pixelColor(1,1, '#55E696')
bilde.pixelColor(7,1, '#55E696')
bilde.pixelColor(7,5, '#55E696')
bilde.pixelColor(6,6, '#55E696')
开发者ID:easydors,项目名称:datormaciba,代码行数:33,代码来源:238.py

示例13: Image

# 需要导入模块: from PythonMagick import Image [as 别名]
# 或者: from PythonMagick.Image import pixelColor [as 别名]
# Fails: 232.py
# Autors: Artis Erglis

from PythonMagick import Image

# Izgatavojam jaunu objektu - bilde
# Objekta izmeers 16x16 pixels
bilde = Image ( "16x16", "#22aaff" )

# Izgatavojam mainiigos x un y
x = y = 0

# Uzstaada objekta 'bolde' x,y pixela kraasu
bilde.pixelColor ( x,y, "#FF0000")

# 16x16 pixels palielina lidz 200x200
bilde.scale ( "200x200" )

# Objektu 'bilde' ieraksata failaa
bilde.write ( "232.png" )

开发者ID:easydors,项目名称:datormaciba,代码行数:22,代码来源:232.py

示例14: range

# 需要导入模块: from PythonMagick import Image [as 别名]
# 或者: from PythonMagick.Image import pixelColor [as 别名]
# Fails 239.py
# Autors: Artis Erglis

from PythonMagick import Image

# Izgatavojam jaunu objektu - bilde
bilde=Image("9x9", "#E65555")

# Izgatavojam mainiigos x un y
x=y=0

bilde.pixelColor(2,3,'#55E666' )
bilde.pixelColor(3,2,'#55E666' )
bilde.pixelColor(4,1,'#55E666' )
bilde.pixelColor(5,2,'#55E666' )
bilde.pixelColor(6,3,'#55E666' )
bilde.pixelColor(2,5,'#55E666' )
bilde.pixelColor(3,4,'#55E666' )
bilde.pixelColor(4,3,'#55E666' )
bilde.pixelColor(5,4,'#55E666' )
bilde.pixelColor(6,5,'#55E666' )
for i in range(2,7):
    bilde.pixelColor(i,0,'#55E666')
for i in range(3,6):
    bilde.pixelColor(i,7,'#55E666')
for i in range(2,5):
    bilde.pixelColor(8,i,'#55E666')
for i in range(2,5):
    bilde.pixelColor(0,i,'#55E666')
for i in range(5,7):
    bilde.pixelColor(i/3,i,'#55E666')
开发者ID:easydors,项目名称:datormaciba,代码行数:33,代码来源:239.py

示例15: Image

# 需要导入模块: from PythonMagick import Image [as 别名]
# 或者: from PythonMagick.Image import pixelColor [as 别名]
#Fails 231.py
#Autors Reinis Prockans

from PythonMagick import Image

#Izgatavojam jaunu objektu - bilde
#Objekta izmers 3x3 pixels
bilde = Image("32x32", "#22aaff")

#Izgatavojam mainigos x un y
x=y=0

#Uzstada objekta 'bilde' x,y pixela krasu
bilde.pixelColor (1, 13, "#eeff22")
bilde.pixelColor (1, 14, "#eeff22")
bilde.pixelColor (1, 15, "#eeff22")
bilde.pixelColor (1, 16, "#eeff22")
bilde.pixelColor (1, 17, "#eeff22")
bilde.pixelColor (1, 18, "#eeff22")
bilde.pixelColor (1, 19, "#eeff22")
bilde.pixelColor (1, 20, "#eeff22")
bilde.pixelColor (2, 13, "#eeff22")
bilde.pixelColor (3, 13, "#eeff22")
bilde.pixelColor (4, 13, "#eeff22")
bilde.pixelColor (5, 13, "#eeff22")
bilde.pixelColor (5, 14, "#eeff22")
bilde.pixelColor (5, 15, "#eeff22")
bilde.pixelColor (5, 16, "#eeff22")
bilde.pixelColor (4, 16, "#eeff22")
bilde.pixelColor (3, 16, "#eeff22")
bilde.pixelColor (2, 16, "#eeff22")
开发者ID:reinispro,项目名称:datormaciba2014-2015,代码行数:33,代码来源:233.py


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