Skip to content

Commit 7d99dd6

Browse files
committed
Here aidan, this will convert a bitmap for u <3
1 parent f989f92 commit 7d99dd6

File tree

9 files changed

+17
-5
lines changed

9 files changed

+17
-5
lines changed

Image-Dict/convert.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,18 @@
55
width, height = selected_image.size
66
output_file = open("output.txt", "a")
77
output_file.write("[")
8-
for row in range(0, height, 1):
9-
for column in range(0, width, 1):
8+
resolution = 2
9+
10+
for row in range(0, height, resolution):
11+
for column in range(0, width, resolution):
1012
red, green, blue, alpha = pix[column, row]
1113
print (str(red) + " " + str(green) + " " + str(blue))
1214

1315
#if blue > 0 and green < blue and red < blue:
14-
if blue < 30 and green < 30 and red < 30:
15-
output_color = "Blue"
16+
if blue < 100 and green > 30 and red < 100:
17+
output_color = "Green"
18+
output_file.write("\"" + str(column) + " " + str(row) + " " + output_color + "\", ")
19+
elif blue < 30 and green > 30 and red > 30:
20+
output_color = "Yellow"
1621
output_file.write("\"" + str(column) + " " + str(row) + " " + output_color + "\", ")
1722
output_file.write("]")

Image-Dict/images/image.png

28.9 KB
Loading
28.6 KB
Loading
File renamed without changes.
File renamed without changes.
File renamed without changes.

Image-Dict/output.txt

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

Image-Dict/shuffle.txt

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

Image-Dict/shuffle_list.py

Lines changed: 6 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)