diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 45588e3..68b3f9e 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -27,9 +27,12 @@ jobs: - name: prep run: mkdir -p /tmp/${{ matrix.model }} - - name: build test + - name: build logo's run: cd Bootup\ Logos && ./run.sh /tmp/${{ matrix.model }}/ ${{matrix.args}} + - name: build logo's + run: cd Bootup\ Logos && python3 img2logo.py -E dummy.png /tmp/${{ matrix.model }}/ + - name: Archive artifacts uses: actions/upload-artifact@v2 with: diff --git a/Bootup Logos/img2logo.py b/Bootup Logos/img2logo.py index fd21e87..806b097 100755 --- a/Bootup Logos/img2logo.py +++ b/Bootup Logos/img2logo.py @@ -193,21 +193,21 @@ def img2hex( Optional `negative' inverts black/white regardless of input image type or other options. """ - - try: - image = Image.open(input_filename) - except BaseException as e: - raise IOError('error reading image file "{}": {}'.format(input_filename, e)) - if make_erase_image: data = [0xFF] * 1024 - elif getattr(image, "is_animated", False): - data = animated_image_to_bytes(image, negative, dither, threshold) else: - # magic/required header - data = [DATA_PROGRAMMED_MARKER, 0x00] # Timing value of 0 - image_bytes = still_image_to_bytes(image, negative, dither, threshold, preview_filename) - data.extend(get_screen_blob([0] * LCD_NUM_BYTES, image_bytes)) + try: + image = Image.open(input_filename) + except BaseException as e: + raise IOError('error reading image file "{}": {}'.format(input_filename, e)) + + if getattr(image, "is_animated", False): + data = animated_image_to_bytes(image, negative, dither, threshold) + else: + # magic/required header + data = [DATA_PROGRAMMED_MARKER, 0x00] # Timing value of 0 + image_bytes = still_image_to_bytes(image, negative, dither, threshold, preview_filename) + data.extend(get_screen_blob([0] * LCD_NUM_BYTES, image_bytes)) # Pad up to the full page size if len(data) < LCD_PAGE_SIZE: diff --git a/Bootup Logos/run.sh b/Bootup Logos/run.sh index 0f08031..2959aa3 100755 --- a/Bootup Logos/run.sh +++ b/Bootup Logos/run.sh @@ -1,4 +1,4 @@ #! /bin/sh echo $1 echo $2 -find Images/ -type f -exec python img2logo.py {} "$1" "$2" \; +find Images/ -type f -exec python3 img2logo.py {} "$1" "$2" \;