aboutsummaryrefslogtreecommitdiff
path: root/test/upscaler
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2023-03-13 18:26:54 +0100
committerlonkaars <loek@pipeframe.xyz>2023-03-13 18:26:54 +0100
commit74ec145c5e44a51789e9117b1ae93dfd7be24d86 (patch)
tree65861f837c708a8ff32ebcdfd389094492085ba9 /test/upscaler
parentb247b52429f2fc6aecd29539ec5afa0d47218147 (diff)
fix display upscaler (output working!)
Diffstat (limited to 'test/upscaler')
-rwxr-xr-xtest/upscaler/img2coe.py (renamed from test/upscaler/bitmap-ball.py)4
-rw-r--r--test/upscaler/makefile4
2 files changed, 5 insertions, 3 deletions
diff --git a/test/upscaler/bitmap-ball.py b/test/upscaler/img2coe.py
index 85474f1..fb4c442 100755
--- a/test/upscaler/bitmap-ball.py
+++ b/test/upscaler/img2coe.py
@@ -9,8 +9,8 @@ def pixeldata():
pixels = image.load()
pixarr = []
w,h = image.size
- for x in range(w):
- for y in range(h):
+ for y in range(h):
+ for x in range(w):
color = pixels[x, y]
crushed_color = ((color[0] >> 4) << 8 | (color[1] >> 4) << 4 | (color[2] >> 4) << 0)
pixarr.append(crushed_color)
diff --git a/test/upscaler/makefile b/test/upscaler/makefile
index 072d5b2..393eda4 100644
--- a/test/upscaler/makefile
+++ b/test/upscaler/makefile
@@ -1,2 +1,4 @@
img.coe: img.png
- ./bitmap-ball.py $< > $@
+
+%.coe: %.png
+ ./img2coe.py $< > $@