1 2 3 4 5 6 7 8 9 |
from PIL import Image im = Image.open("xxx.jpeg") pix = im.load() width = im.size[0] height = im.size[1] for x in range(width): for y in range(height): r, g, b = pix[x, y] print(r, g, b) |
1 2 3 4 5 6 7 8 9 |
from PIL import Image im = Image.open("xxx.jpeg") pix = im.load() width = im.size[0] height = im.size[1] for x in range(width): for y in range(height): r, g, b = pix[x, y] print(r, g, b) |
可以的