File tree Expand file tree Collapse file tree 2 files changed +18
-7
lines changed
apps/com.micropythonos.imageview/assets Expand file tree Collapse file tree 2 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -279,11 +279,14 @@ def scale_image(self):
279279
280280 def clear_image (self ):
281281 """Clear current image or GIF source to free memory."""
282- if self .current_image_dsc :
283- self .current_image_dsc = None # Release reference to descriptor
284- self .image .set_src (None ) # Clear image source
285- self .gif .set_src (None ) # Clear GIF source
282+ # if self.current_image_dsc:
283+ # self.current_image_dsc = None # Release reference to descriptor
284+ # self.image.set_src(None) # Clear image source
285+ # self.gif.set_src(None) # Clear GIF source causes crash!
286286 #self.gif.add_flag(lv.obj.FLAG.HIDDEN)
287287 #self.image.remove_flag(lv.obj.FLAG.HIDDEN)
288288 #lv.image_cache_invalidate_src(None) # Invalidate LVGL image cache
289- gc .collect () # Force garbage collection
289+ # These 2 are needed to enable infinite slides with just 10MB RAM:
290+ lv .image .cache_drop (None ) # This helps a lot!
291+ gc .collect () # Force garbage collection seems to fix memory alloc issues!
292+
Original file line number Diff line number Diff line change 1313
1414#TFT_HOR_RES=640
1515#TFT_VER_RES=480
16- TFT_HOR_RES = 320
17- TFT_VER_RES = 240
16+
17+ #TFT_HOR_RES=320
18+ #TFT_VER_RES=240
19+
20+ TFT_HOR_RES = 1024
21+ TFT_VER_RES = 576
22+
23+ # Works:
24+ #TFT_HOR_RES=1920
25+ #TFT_VER_RES=1080
1826
1927bus = lcd_bus .SDLBus (flags = 0 )
2028
You can’t perform that action at this time.
0 commit comments