diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/bitmap-ball.py | 4 | ||||
-rw-r--r-- | src/makefile | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/bitmap-ball.py b/src/bitmap-ball.py index d28609c..4d5be0c 100755 --- a/src/bitmap-ball.py +++ b/src/bitmap-ball.py @@ -1,14 +1,14 @@ #!/bin/python3 from PIL import Image -import os +import sys WIDTH = 10 HEIGHT = 10 # return array of 12-bit color values (0bRRRGGGBBB) def pixeldata(): - image = Image.open("./ball.png") + image = Image.open(sys.argv[-1]) # use last argument as input image file pixels = image.load() pixarr = [] for x in range(WIDTH): diff --git a/src/makefile b/src/makefile index 2906e87..5dff86d 100644 --- a/src/makefile +++ b/src/makefile @@ -1,6 +1,6 @@ pixeldata-ball.vhd: pixeldata-ball-top.vhd bitmap-ball.vhd pixeldata-ball-bottom.vhd cat $^ > $@ -bitmap-ball.vhd: bitmap-ball.py - python3 $< > $@ +bitmap-ball.vhd: ball.png + python3 bitmap-ball.py $< > $@ |