Python buffer buffer module

I am looking for a python module that can directly display jpgor pngfile in /dev/fb0.

I hope the module can invoke and display the image on the screen as follows:

show_photo(path_to_jpg, x, y, dev='/dev/fb0')

I searched this kind of python module on Google for several days and found the link: [Module] Python Frame Buffer , but the site was not found.

Now I use the C program and call the function os.system(), and it is too slow. Is there a python module that can display the image directly in the framebuffer and support static image selection? It would be better if the module also supports playing video files, such as mplayer.

+5
source share
1

, pygame.

http://www.pygame.org/wiki/about

Pygame opengl, directx, windib, X11, linux, ...

UPDATE: :

import pygame
import sys
import time

pygame.init()

size = (pygame.display.Info().current_w, pygame.display.Info().current_h)
black = 0, 0, 0

screen = pygame.display.set_mode(size)

ball = pygame.image.load("ball.gif")
ballrect = ball.get_rect()

screen.fill(black)
screen.blit(ball, ballrect)
pygame.display.flip()

time.sleep(5)

Run:

SDL_NOMOUSE=1 python ./ball.py
+6

All Articles