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 iterable

    I 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()
    image0 = M5Img("/sd/images/sled150.png", x=0, y=0, parent=None)