Ok, nvm, I found the answer... :P >>> import StringIO >>> pyglet.image.load( "", file = StringIO.StringIO(pic.data) >>> ).get_texture(rectangle=True)
--André. On Nov 13, 7:50 pm, Andre Maximo <[EMAIL PROTECTED]> wrote: > Hello all, > > I've an image already opened and its bytes stored in a variable. > Anyone knows how can I build something like this: > > >>> tex = pyglet.image.load( "file.jpg" ).get_texture(rectangle=True) > > But instead of providing "file.jpg" I'll give something like this: > > >>> tex = pyglet.image.load( file = pic.data ).get_texture(rectangle=True) > > Where the property "data" of the object "pic" is a string of bytes > of the "file.jpg". > > Thanks, > André. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
