import Image
picture = Image.open("/path/of/your/picture.jpg")
# Get the dimensions of your picture
width, height = picture.size()
# Process the pixels you are focused on
for x in width:
for y in height:
current_color = picture.getpixel( (x,y) )
####################################################################
#create a new (R,G,B) tuple called new_color
####################################################################
picture.putpixel( (x,y), new_color)
您将需要使用
Image
模块来完成您想要完成的任务。你知道吗相关问题 更多 >
编程相关推荐