diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/upscaler/img2coe.py (renamed from test/upscaler/bitmap-ball.py) | 4 | ||||
-rw-r--r-- | test/upscaler/makefile | 4 |
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 $< > $@ |