Always make normal and flipped

This commit is contained in:
Ben V. Brown
2022-08-06 21:42:21 +10:00
parent 3c62bb7fe1
commit 2942212437
2 changed files with 15 additions and 12 deletions

View File

@@ -30,9 +30,6 @@ jobs:
- name: build all files for the device
run: cd Bootup\ Logos && ./run.sh /tmp/${{ matrix.model }}/ ${{matrix.args}}
- name: build all files for the device Flipped
run: cd Bootup\ Logos && ./run.sh /tmp/${{ matrix.model }}/ ${{matrix.args}} -r
- name: build logo erase file
run: cd Bootup\ Logos && python3 img2logo.py -E erase_stored_image /tmp/${{ matrix.model }}/ ${{matrix.args}}

View File

@@ -219,7 +219,7 @@ def img2hex(
except BaseException as e:
raise IOError('error reading image file "{}": {}'.format(input_filename, e))
if flip:
image.rotate(180)
image = image.rotate(180)
if getattr(image, "is_animated", False):
data = animated_image_to_bytes(image, negative, dither, threshold)
@@ -281,12 +281,6 @@ def parse_commandline():
help="photo negative: exchange black and white in output",
)
parser.add_argument(
"-r",
"--rotate",
action="store_true",
help="Rotate image to be upside down; for left handed setups",
)
parser.add_argument(
"-t",
@@ -336,7 +330,7 @@ if __name__ == "__main__":
sys.exit(1)
print(f"Converting {args.input_filename} => {args.output_filename}")
img2hex(
input_filename=args.input_filename,
output_filename_base=args.output_filename,
@@ -346,5 +340,17 @@ if __name__ == "__main__":
negative=args.negative,
make_erase_image=args.erase,
isPinecil=args.pinecil,
flip = args.rotate,
flip = False,
)
img2hex(
input_filename=args.input_filename,
output_filename_base=args.output_filename,
preview_filename=args.preview,
threshold=args.threshold,
dither=args.dither,
negative=args.negative,
make_erase_image=args.erase,
isPinecil=args.pinecil,
flip = True,
)