I am writing some code to display an image on the screen on the tufty 2040.
import jpegdec from picographics import PicoGraphics, DISPLAY_TUFTY_2040 display = PicoGraphics(display=DISPLAY_TUFTY_2040) # Create a new JPEG decoder for our PicoGraphics j = jpegdec.JPEG(display) # Open the JPEG file j.open_file("squirrel.jpeg") # Decode the JPEG j.decode(1, 1, jpegdec.JPEG_SCALE_FULL) # Display the result display.update()
This code is trying to read the existing squirrel image on the examples provided by stock. Python file and image file exist on the tufty itself. The file will not work. It either doesnt print anything to shell or gives
Traceback (most recent call last): File "<stdin>", line 14, in <module> OSError: [Errno 2] ENOENT
which hints that the file cannot be found which is odd. Any help is appreciated.