mirror of
https://github.com/Ralim/IronOS-Meta.git
synced 2025-04-15 11:27:48 +00:00
Make erase image as well
This commit is contained in:
5
.github/workflows/push.yml
vendored
5
.github/workflows/push.yml
vendored
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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" \;
|
||||
|
||||
Reference in New Issue
Block a user