3

When I'm in pygame headless mode with

os.environ["SDL_VIDEODRIVER"] = "dummy"

the surface has no rendered fonts, only black filled rectangles. (I only tried it on a linux pc.)

when I turn off headless mode everything works perfectly.

Code:

self.screen = pygame.display.set_mode((self.WIDTH, self.HEIGHT))
.....drawing on the surface.....
...
data = pygame.image.tostring(self.screen, 'RGB')
img = Image.fromstring('RGB', (128,64), data).convert()
img.show()
img.save('./img/out.png')

Thanks for your help!

haronaut
  • 409
  • 3
  • 16
  • You should add what O.S. you are using (windows/linux/os x) - anyway, I think you way out will be reporting this as a bug against pygame itself. – jsbueno May 07 '15 at 13:12
  • 1
    I have sent a but report on this issue. In the meantime I tried a workaround by using a bitmap font, which works quite well. – haronaut May 11 '15 at 17:08

0 Answers0