Skip to content

Commit 3f77663

Browse files
committed
This stuff works bby
1 parent bb332c3 commit 3f77663

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

Image-Dict/convert.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@
55
width, height = selected_image.size
66
output_file = open("output.txt", "a")
77
output_file.write("[")
8-
for row in range(height):
9-
for column in range(width):
8+
for row in range(0, height, 4):
9+
for column in range(0, width, 4):
1010
red, green, blue, alpha = pix[column, row]
11-
print (str(red) + str(green) + str(blue))
11+
print (str(red) + " " + str(green) + " " + str(blue))
1212

13-
if blue > 0:
13+
if blue > 0 and green < blue and red < blue:
1414
output_color = "Blue"
15-
else:
16-
output_color = "White"
17-
output_file.write("\"" + str(column) + " " + str(row) + " " + output_color + "\", ")
15+
output_file.write("\"" + str(column) + " " + str(row) + " " + output_color + "\", ")
1816
output_file.write("]")

Image-Dict/output.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

Image-Dict/test_image.png

10.5 KB
Loading

0 commit comments

Comments
 (0)