Skip to content
Advertisement

PIL and pygame.image

I had opened an image using PIL, as

JavaScript

Draw some text on it, as

JavaScript

and then saved it as

JavaScript

to open it using pygame.image

JavaScript

I just want to do it without saving.. Can that be possible? It is taking a lot of time to save and then load(0.12 sec Yes, that is more as I have multiple images which require this operation). Can that save method be surpassed?

Advertisement

Answer

You could use the fromstring() function from pygame.image. The following should work, according to the documentation:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement