Skip to content

Commit ddbd68d

Browse files
committed
rock and roll and other lateral transforms
1 parent 7d99dd6 commit ddbd68d

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

Image-Dict/convert.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,19 @@
99

1010
for row in range(0, height, resolution):
1111
for column in range(0, width, resolution):
12-
red, green, blue, alpha = pix[column, row]
12+
try:
13+
red, green, blue, alpha = pix[column, row]
14+
except:
15+
red, green, blue = pix[column, row]
1316
print (str(red) + " " + str(green) + " " + str(blue))
1417

1518
#if blue > 0 and green < blue and red < blue:
1619
if blue < 100 and green > 30 and red < 100:
1720
output_color = "Green"
1821
output_file.write("\"" + str(column) + " " + str(row) + " " + output_color + "\", ")
22+
elif blue < 30 and green < 30 and red < 30:
23+
output_color = "Black"
24+
output_file.write("\"" + str(column) + " " + str(row) + " " + output_color + "\", ")
1925
elif blue < 30 and green > 30 and red > 30:
2026
output_color = "Yellow"
2127
output_file.write("\"" + str(column) + " " + str(row) + " " + output_color + "\", ")

Image-Dict/image.png

21.1 KB
Loading

Image-Dict/output.txt

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

Image-Dict/shuffle.txt

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

0 commit comments

Comments
 (0)