1
0
forked from me/IronOS-Meta

Make erase image as well

This commit is contained in:
Ben V. Brown
2022-02-14 22:23:02 +11:00
parent 90b2e2c311
commit 6644d9550c
3 changed files with 17 additions and 14 deletions

View File

@@ -27,9 +27,12 @@ jobs:
- name: prep - name: prep
run: mkdir -p /tmp/${{ matrix.model }} run: mkdir -p /tmp/${{ matrix.model }}
- name: build test - name: build logo's
run: cd Bootup\ Logos && ./run.sh /tmp/${{ matrix.model }}/ ${{matrix.args}} 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 - name: Archive artifacts
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:

View File

@@ -193,15 +193,15 @@ def img2hex(
Optional `negative' inverts black/white regardless of input image type Optional `negative' inverts black/white regardless of input image type
or other options. or other options.
""" """
if make_erase_image:
data = [0xFF] * 1024
else:
try: try:
image = Image.open(input_filename) image = Image.open(input_filename)
except BaseException as e: except BaseException as e:
raise IOError('error reading image file "{}": {}'.format(input_filename, e)) raise IOError('error reading image file "{}": {}'.format(input_filename, e))
if make_erase_image: if getattr(image, "is_animated", False):
data = [0xFF] * 1024
elif getattr(image, "is_animated", False):
data = animated_image_to_bytes(image, negative, dither, threshold) data = animated_image_to_bytes(image, negative, dither, threshold)
else: else:
# magic/required header # magic/required header

View File

@@ -1,4 +1,4 @@
#! /bin/sh #! /bin/sh
echo $1 echo $1
echo $2 echo $2
find Images/ -type f -exec python img2logo.py {} "$1" "$2" \; find Images/ -type f -exec python3 img2logo.py {} "$1" "$2" \;