I am running a raspberry pi3b+ via ssh. There is a hyperpixel4 screen by Pimoroni attached to the Pi and it's working fine. I am trying to display an image on the screen attached to the Pi with a python script via SSH.
I tried PIL and Pygame, but none works.
from PIL import Imageimg = Image.open("image.jpg")img.show()import pygame #voor beeld en geluidfrom time import sleepfrom pygame.locals import *pygame.init()WIDTH = 1280HEIGHT = 800windowSurface = pygame.display.set_mode((WIDTH, HEIGHT), 0, 0)img = pygame.image.load("ndvi.jpg")windowSurface.blit(img, (0, 0))pygame.display.flip()
With PIL, nothing happens at all. Even if I don't use SSH and type directly into the Pi's terminal.Pygame works if I type directly into the Pi (with a delay, but that can be solved with subprocess maybe). But it shows this error via ssh-"Unable to open a console terminal".
Thanks