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)
-
@wmatkins Hello, have you solved it? I have the same problem and I don't know what happens with the images
-
@wmatkins said in Please help with persistent error message. Thanks...:
res/img/UIFScreen2.JPG
Modify the file to res/img/UIFScreen2.jpg
-
@lbuque I have tried lowercase and uppercase, changing the file type and extension, also if you modify the original background the same error appears. Thank you
-
I had the same issue today but was able to solve it by uploading the image file to my M5Stack before running.
You can do it by opening the device file manager in UI Flow.
Clicking it will open the console so you can link to your device and then you'll be able to find an icon on the console window helper to open the file manager.
Upload the image to the folder you specified in code (it's not that fast but it works) and then run your project again.