On 08/11/2014 09:34 PM, diliup gabadamudalige wrote:> f.name <http://f.name> = '88keykbd.jpg'
> Dear Radomir,
>
> s = pygame.image.load("88keykbd.png")
> f = StringIO.StringIO()
> pygame.image.save(s, f)Of course you can't -- no such file exists. It's only in memory, in the
> pygame.image.load("88keykbd.jpg")
>
>
> yourimage = f.getvalue()
>
> why does the line pygame.image.load("88keykbd.jpg") throw an error? It
> throws pygame.error: Couldn't open 88keykbd.jpg
> I cant find the88keykbd.jpeg in the path
f variable. That's the whole point. You can get to the *contents* of
that variable with f.getvalue().
--
The Sheep