PIL /枕头:无法使用putpixel()来更改像素值

时间:2017-02-08 05:15:34

标签: python python-imaging-library pillow

我正在尝试运行:

from PIL import Image
import os
os.chdir('C:\\.....FOLDER.....')
catIm = Image.open('zophie.png')

width, height = catIm.size
quartersizedIm = catIm.resize((int(width / 4), int(height / 4)))

for x in range(0,102,1):
    for y in range(0,136,1):
        quartersizedIm.putpixel((x,y),(0,0,255,255))
            quartersizedIm.putpixel((x,y))=quartersizedIm.putpixel((x,y))+100

我无法将像素更改为固定值,收到错误:

  

无法分配到函数调用

0 个答案:

没有答案