Compatibility for python 3.7
This commit is contained in:
parent
33c335b001
commit
e0995302eb
10
im_create.py
10
im_create.py
@ -96,14 +96,14 @@ class PixelArt:
|
|||||||
for j in range(128):
|
for j in range(128):
|
||||||
color = self.canvas.itemcget(self.canvas.find_closest(i*12+6, j*12+6), "fill")
|
color = self.canvas.itemcget(self.canvas.find_closest(i*12+6, j*12+6), "fill")
|
||||||
if color != "white":
|
if color != "white":
|
||||||
match self.colors.index(color):
|
tc = self.colors.index(color)
|
||||||
case 0:
|
if tc == 0:
|
||||||
color = "red"
|
color = "red"
|
||||||
case 1:
|
elif tc == 1:
|
||||||
color = "green"
|
color = "green"
|
||||||
case 2:
|
elif tc == 2:
|
||||||
color = "blue"
|
color = "blue"
|
||||||
case 3:
|
elif tc == 3:
|
||||||
color = "black"
|
color = "black"
|
||||||
pixel_data.append([i, 127-j, color])
|
pixel_data.append([i, 127-j, color])
|
||||||
f = open('out.txt', 'w')
|
f = open('out.txt', 'w')
|
||||||
|
Loading…
Reference in New Issue
Block a user