【发布时间】:2019-10-15 11:22:48
【问题描述】:
我正在使用 Pygame Screen 显示全屏图像...它可以在我的显示器上运行,但是当我将树莓派连接到电视并运行代码时,它不是完全全屏的,而且有点小。
这是我使用的代码:
screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN)
displayRes = pygame.display.get_surface()
screen.fill((0, 0, 0))
pic = pygame.image.load("standard.jpg")
screen.blit(pygame.transform.scale(pic, (int(displayRes.get_width()), int(displayRes.get_height()))), (0, 0))
pygame.display.flip()
编辑:实际上 pygame.display.get_surface() 返回错误的宽度和高度数字。当我将这些数字用于 OMXPlayer 时,它也不会全屏显示。
【问题讨论】:
-
要检查的一件事是您的电视的过扫描(或欠扫描)设置 - en.wikipedia.org/wiki/Overscan
标签: python raspberry-pi pygame fullscreen television