From 6de33490af888a6f528fc3966e71aaa0c7dfe575 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Tue, 10 Jun 2025 00:28:14 +0200 Subject: [PATCH] cleanups --- .../com.micropythonos.imageview/assets/imageview.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/internal_filesystem/apps/com.micropythonos.imageview/assets/imageview.py b/internal_filesystem/apps/com.micropythonos.imageview/assets/imageview.py index fb411609..b67f6da3 100644 --- a/internal_filesystem/apps/com.micropythonos.imageview/assets/imageview.py +++ b/internal_filesystem/apps/com.micropythonos.imageview/assets/imageview.py @@ -25,17 +25,10 @@ class ImageView(Activity): self.setContentView(screen) def onResume(self, screen): - #lv.libjpeg_turbo_init() - #first = lv.image_decoder_t() - #decoder = lv.image.decoder_get_next(first) - #decoder = lv.image_decoder_t.get_next(first) - #decoder.delete() self.images.clear() for item in os.listdir(self.imagedir): print(item) - #if item.endswith(".jpg") or item.endswith(".jpeg"): if item.endswith(".jpg") or item.endswith(".jpeg") or item.endswith(".png"): - #if item.endswith(".png"): fullname = f"{self.imagedir}/{item}" size = os.stat(fullname)[6] print(f"size: {size}") @@ -66,14 +59,12 @@ class ImageView(Activity): try: self.label.set_text(name) self.image.set_src(f"P:{name}") - w = self.image.get_width() - h = self.image.get_height() - print(f"the LVGL image has size: {w}x{h}") + print(f"the LVGL image has size: {self.image.get_width()}x{self.image.get_height()}") header = lv.image_header_t() self.image.decoder_get_info(self.image.get_src(), header) print(f"the real image has size: {header.w}x{header.h}") #image.set_size(128, 128) self.image.set_scale(512) - print(f"done with show_image({name}) got {w}x{h}") + print(f"after set_scale, the LVGL image has size: {self.image.get_width()}x{self.image.get_height()}") except Exception as e: print(f"show_image got exception: {e}")