On Thu, Mar 4, 2010 at 5:16 AM, Philippe <[email protected]> wrote:
> I gave up, and used PIL instead of it.
>
> mgr = pyglet.image.get_buffer_manager()
> color_buffer = mgr.get_color_buffer()
> image = color_buffer.image_data.get_image_data()
> pil_image = Image.fromstring(image.format, (image.width,
> image.height), image.get_data(image.format, image.pitch))
> pil_image = pil_image.transpose(Image.FLIP_TOP_BOTTOM)
> pil_image = pil_image.convert('RGB')
> pil_image.save(file, "PNG")
That looks like a decent solution. I recall running out of time to research
this issue last time around.
--
Tristam MacDonald
http://swiftcoder.wordpress.com/
--
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.