Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6de3349

Browse files
cleanups
1 parentd88966e commit6de3349

File tree

1 file changed

+2
-11
lines changed
  • internal_filesystem/apps/com.micropythonos.imageview/assets

1 file changed

+2
-11
lines changed

‎internal_filesystem/apps/com.micropythonos.imageview/assets/imageview.py‎

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,10 @@ def onCreate(self):
2525
self.setContentView(screen)
2626

2727
defonResume(self,screen):
28-
#lv.libjpeg_turbo_init()
29-
#first = lv.image_decoder_t()
30-
#decoder = lv.image.decoder_get_next(first)
31-
#decoder = lv.image_decoder_t.get_next(first)
32-
#decoder.delete()
3328
self.images.clear()
3429
foriteminos.listdir(self.imagedir):
3530
print(item)
36-
#if item.endswith(".jpg") or item.endswith(".jpeg"):
3731
ifitem.endswith(".jpg")oritem.endswith(".jpeg")oritem.endswith(".png"):
38-
#if item.endswith(".png"):
3932
fullname=f"{self.imagedir}/{item}"
4033
size=os.stat(fullname)[6]
4134
print(f"size:{size}")
@@ -66,14 +59,12 @@ def show_image(self, name):
6659
try:
6760
self.label.set_text(name)
6861
self.image.set_src(f"P:{name}")
69-
w=self.image.get_width()
70-
h=self.image.get_height()
71-
print(f"the LVGL image has size:{w}x{h}")
62+
print(f"the LVGL image has size:{self.image.get_width()}x{self.image.get_height()}")
7263
header=lv.image_header_t()
7364
self.image.decoder_get_info(self.image.get_src(),header)
7465
print(f"the real image has size:{header.w}x{header.h}")
7566
#image.set_size(128, 128)
7667
self.image.set_scale(512)
77-
print(f"done with show_image({name}) got{w}x{h}")
68+
print(f"after set_scale, the LVGL image has size:{self.image.get_width()}x{self.image.get_height()}")
7869
exceptExceptionase:
7970
print(f"show_image got exception:{e}")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp