aboutsummaryrefslogtreecommitdiff
path: root/tools/png2tiles.py
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2022-09-15 08:31:43 +0100
committerJuan J. Martinez <jjm@usebox.net>2022-09-15 08:31:43 +0100
commit16d6f8e322311eff51b23425218b2d6c383170d6 (patch)
treee8f4c0d9c4f64a17bba628481befd521671df6ab /tools/png2tiles.py
parent495b06cc5e3ffb2d5448a98ced49d2637105b119 (diff)
downloadubox-msx-lib-16d6f8e322311eff51b23425218b2d6c383170d6.tar.gz
ubox-msx-lib-16d6f8e322311eff51b23425218b2d6c383170d6.zip
The order of elements on a set is undefined
This could lead to change in order, for example, when changing version of Python. This change ensures the colours are always in the same order.
Diffstat (limited to 'tools/png2tiles.py')
-rwxr-xr-xtools/png2tiles.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/png2tiles.py b/tools/png2tiles.py
index 43eb1e0..55e7c53 100755
--- a/tools/png2tiles.py
+++ b/tools/png2tiles.py
@@ -97,7 +97,7 @@ def read_image(image_name, out, color):
# get the attibutes of the tile
# FIXME: this may not be right
for i in range(0, len(tile), DEF_W):
- cols = list(set(tile[i : i + DEF_W]))
+ cols = list(sorted(set(tile[i : i + DEF_W])))
if len(cols) > 2:
raise Exception(