Blinka makes her debut on the big screen! With this library you can use CircuitPython displayio code on PC and Raspberry Pi to output to a PyGame window instead of a hardware display connected to I2C or SPI. This makes it easy to to use displayio elements on HDMI and other large format screens.
The above examples all fail to run on Raspberry Pi 4 with File is not a Windows BMP file
> python blinka_displayio_pygamedisplay_simpletest.py
pygame 2.0.1 (SDL 2.0.9, Python 3.7.3)
Hello from the pygame community. https://www.pygame.org/contribute.html
loading icon: blinka.png
False
Traceback (most recent call last):
File "blinka_displayio_pygamedisplay_simpletest.py", line 15, in <module>
display = PyGameDisplay(icon="blinka.png", width=320, height=240)
File "/mnt/projects/Blinka_Displayio_PyGameDisplay/blinka_displayio_pygamedisplay.py", line 58, in __init__
super().__init__(None, _INIT_SEQUENCE, **kwargs)
File "/mnt/projects/Blinka_Displayio_PyGameDisplay/.env/lib/python3.7/site-packages/displayio/display.py", line 128, in __init__
self._initialize(init_sequence)
File "/mnt/projects/Blinka_Displayio_PyGameDisplay/blinka_displayio_pygamedisplay.py", line 68, in _initialize
icon = pygame.image.load(self._icon)
pygame.error: File is not a Windows BMP file
Reading the pygame documentation it seems that GIF, JPG & PNG are only supported if pygame.image.get_extended() is not False.
Python 3.7.3 (default, Jan 22 2021, 20:04:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygame
pygame 2.0.1 (SDL 2.0.9, Python 3.7.3)
Hello from the pygame community. https://www.pygame.org/contribute.html
>>> pygame.image.get_extended()
False
I don't know what determines if it is extended or not. As far as I can tell I have the appropriate SDL installed:
The above examples all fail to run on Raspberry Pi 4 with
File is not a Windows BMP file
Reading the
pygame
documentation it seems thatGIF
,JPG
&PNG
are only supported ifpygame.image.get_extended()
is notFalse
.I don't know what determines if it is extended or not. As far as I can tell I have the appropriate SDL installed:
Weirdly, I'm convinced that these have run on my Raspberry Pi before