forked from me/IronOS-Meta
Update to generate nicer flipped logo file names (#29)
* Update img2logo.py * Update img2logo.py
This commit is contained in:
@@ -238,10 +238,17 @@ def img2hex(
|
|||||||
deviceSettings = MiniwareSettings
|
deviceSettings = MiniwareSettings
|
||||||
if isPinecil:
|
if isPinecil:
|
||||||
deviceSettings = PinecilSettings
|
deviceSettings = PinecilSettings
|
||||||
# Generate both possible outputs
|
|
||||||
output_name = output_filename_base + os.path.basename(input_filename)
|
# Split name from extension so we can mangle in the _L suffix for flipped images
|
||||||
|
split_name = os.path.splitext( os.path.basename(input_filename))
|
||||||
|
|
||||||
if flip:
|
if flip:
|
||||||
output_name +="_L"
|
base = split_name[0]
|
||||||
|
ext = split_name[1]
|
||||||
|
base =base+"_L"
|
||||||
|
split_name = [base,ext]
|
||||||
|
output_name = output_filename_base +split_name[0] +split_name[1]
|
||||||
|
|
||||||
DFUOutput.writeFile(
|
DFUOutput.writeFile(
|
||||||
output_name + ".dfu",
|
output_name + ".dfu",
|
||||||
data,
|
data,
|
||||||
|
|||||||
Reference in New Issue
Block a user