Skip to content

Commit 7242a5a

Browse files
Change back to PNGs
There is no real performance hit, and they are easier for developers.
1 parent e0ea2d7 commit 7242a5a

File tree

7 files changed

+2
-10
lines changed

7 files changed

+2
-10
lines changed
16.2 KB
Loading
5.87 KB
Loading
9.01 KB
Loading

internal_filesystem/builtin/apps/com.example.launcher/assets/launcher.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,8 @@
2929

3030
def load_icon(icon_path):
3131
with open(icon_path, 'rb') as f:
32-
f.seek(12) # first 12 bytes are headers
3332
image_data = f.read()
3433
image_dsc = lv.image_dsc_t({
35-
"header": {
36-
"magic": lv.IMAGE_HEADER_MAGIC,
37-
"w": 64,
38-
"h": 64,
39-
"stride": 64 * 2,
40-
"cf": lv.COLOR_FORMAT.RGB565A8
41-
},
4234
'data_size': len(image_data),
4335
'data': image_data
4436
})
@@ -79,13 +71,13 @@ def load_icon(icon_path):
7971
app_cont.set_style_border_width(0, 0)
8072
app_cont.set_style_pad_all(0, 0)
8173
# Load and display icon
82-
icon_path = f"{app_dir_fullpath}/res/mipmap-mdpi/icon_64x64.bin"
74+
icon_path = f"{app_dir_fullpath}/res/mipmap-mdpi/icon_64x64.png"
8375
image = lv.image(app_cont)
8476
try:
8577
image.set_src(load_icon(icon_path))
8678
except Exception as e:
8779
print(f"Error loading icon {icon_path}: {e} - loading default icon")
88-
icon_path = "/builtin/res/mipmap-mdpi/default_icon_64x64.bin"
80+
icon_path = "/builtin/res/mipmap-mdpi/default_icon_64x64.png"
8981
try:
9082
image.set_src(load_icon(icon_path))
9183
except Exception as e:
6.95 KB
Loading
19.9 KB
Loading
6.57 KB
Loading

0 commit comments

Comments
 (0)