Change back to PNGs

There is no real performance hit, and they are easier for developers.
This commit is contained in:
Thomas Farstrike
2025-05-01 10:21:52 +02:00
parent e0ea2d76ae
commit 7242a5aed1
7 changed files with 2 additions and 10 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

@@ -29,16 +29,8 @@ start = time.ticks_ms()
def load_icon(icon_path):
with open(icon_path, 'rb') as f:
f.seek(12) # first 12 bytes are headers
image_data = f.read()
image_dsc = lv.image_dsc_t({
"header": {
"magic": lv.IMAGE_HEADER_MAGIC,
"w": 64,
"h": 64,
"stride": 64 * 2,
"cf": lv.COLOR_FORMAT.RGB565A8
},
'data_size': len(image_data),
'data': image_data
})
@@ -79,13 +71,13 @@ for app_dir_fullpath in app_dirs:
app_cont.set_style_border_width(0, 0)
app_cont.set_style_pad_all(0, 0)
# Load and display icon
icon_path = f"{app_dir_fullpath}/res/mipmap-mdpi/icon_64x64.bin"
icon_path = f"{app_dir_fullpath}/res/mipmap-mdpi/icon_64x64.png"
image = lv.image(app_cont)
try:
image.set_src(load_icon(icon_path))
except Exception as e:
print(f"Error loading icon {icon_path}: {e} - loading default icon")
icon_path = "/builtin/res/mipmap-mdpi/default_icon_64x64.bin"
icon_path = "/builtin/res/mipmap-mdpi/default_icon_64x64.png"
try:
image.set_src(load_icon(icon_path))
except Exception as e:
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB