Please help with persistent error message. Thanks...
-
"Get res/img/UIFScreen2.JPG width and height failed"
This is driving me mad. 26.9K properly formatted (baseline, no Progressive, 4:4:4 sample) JPG will not display in Uniflow 2.0.4 and returns error above. Background image is exactly 135 x 240 px for the M5StickC 2+. Displays OK in UIF but won't work when run.
Would greatly appreciate any corrections or suggestions. Thanks...
import os, sys, io import M5 from M5 import * from boot_option import * from hardware import * from unit import NCIRUnit import time image0 = None TempF = None i2c0 = None ncir_0 = None def setup(): global image0, TempF, i2c0, ncir_0 set_boot_option(1) i2c0 = I2C(0, scl=Pin(33), sda=Pin(32), freq=100000) ncir_0 = NCIRUnit(i2c0) M5.begin() Widgets.fillScreen(0xec0865) image0 = Widgets.Image("res/img/UIFScreen2.JPG", 0, 0) TempF = Widgets.Label("TempF", 0, 105, 1.0, 0xe5ff13, 0x0838ec, Widgets.FONTS.DejaVu40) Widgets.setRotation(3) def loop(): global image0, TempF, i2c0, ncir_0 M5.update() TempF.setText(str((int(ncir_0.get_object_temperature())) * 1.8 + 32)) time.sleep(5)