From da810896f4c249d61f00e9e413d82dad2ad2058e Mon Sep 17 00:00:00 2001 From: lonkaars Date: Tue, 20 Dec 2022 12:06:33 +0100 Subject: update makefile for calling python script --- src/bitmap-ball.py | 4 ++-- src/makefile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') 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 $< > $@ -- cgit v1.2.3