master
LEdoian 3 years ago
parent 3383699269
commit 646089eaaa

@ -36,6 +36,7 @@ class Picture:
def load(cls, filename):
from PIL import Image
im = Image.open(filename)
im = im.convert('RGB')
ht = im.height
wt = im.width
data = []
@ -43,7 +44,7 @@ class Picture:
for x in range(wt):
line = []
for y in range(ht):
line.append(Pixel(*(access[x, y][:3])))
line.append(Pixel(*(access[x, y])))
data.append(line)
result = cls(data)

Loading…
Cancel
Save