M5.Lcd.drawJpg in python
-
Hello,
Is there an equivalent version of "M5.Lcd.drawJpg" in python on the M5Stack?
-
lcd.image(100, 100, file="res/default.jpg", scale=0, type=lcd.JPG)
-
image0 = M5Img(107, 65, "res/default.jpg", True) -
Hi @ajb2k3, is M5Img still the preferred way to display an image on the Core2?
Somehow it doesn't work for me, neither from flash nor from micro SD card.
>>> from m5stack import * from m5stack_ui import * from uiflow import * image0 = M5Img(0, 0, "/flash/images/sled240.jpg", True) Traceback (most recent call last): File "<stdin>", line 4, in <module> File "m5stack_ui.py", line 493, in __init__ TypeError: 'int' object isn't iterableI can use lcd.image(), but that crashes for pictures from the mico SD card (link).
-
Now I found working code for UIFlow 1.7.2, but this only supports PNGs:
from m5stack import * from m5stack_ui import * screen = M5Screen() screen.clean_screen() screen.set_screen_bg_color(0xFFFFFF) image0 = M5Img("/sd/images/sled150.png", x=0, y=0, parent=None)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login