0

I'm using Pygame Screen to show a fullscreen image... It works on my monitor, but when I connect the raspberry to TV and run the code, it's not completely fullscreen and little bit smaller.

Here is the code I use:

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()

Edit: Actually pygame.display.get_surface() returns the wrong numbers of width and height. When I'm using these numbers for OMXPlayer, it doesn't display in fullscreen, too.

Milad
  • 377
  • 1
  • 3
  • 15
  • 1
    One thing to check is the Overscan (or underscan) settings of your TV - https://en.wikipedia.org/wiki/Overscan – Kingsley Oct 15 '19 at 21:29

1 Answers1

0

@Kingsley comment gave me the idea to turn the Overscan in Raspbian off and now it works great on TV and monitor.

To do that: Open Terminal ~> Type sudo raspi-config ~> Advanced Option ~> Overscan ~> Switch to NO ~> Reboot your Raspberry!

Milad
  • 377
  • 1
  • 3
  • 15