I tried different encoder:
        mgr = pyglet.image.get_buffer_manager()
        # encoder = pyglet.image.codecs.png.PNGImageEncoder()
        encoder = pyglet.image.codecs.pil.PILImageEncoder()
        mgr.get_color_buffer().save("screenshot.png", encoder=encoder)

But I never get a screenshot with alpha. It looks like a RGB, but I
want RGBA


On Mar 3, 3:31 pm, Tristam MacDonald <[email protected]> wrote:
> On Wed, Mar 3, 2010 at 9:23 AM, Philippe <[email protected]> wrote:
> > works well, but I get some issues with opacity.
> > It seems that it does not handle correctly the alpha channel.
>
> > any idea ?
>
> Last time I tried it, the problem was that it *does* handle the alpha
> channel correctly.
>
> You probably don't want alpha in the image file, so either strip out the
> alpha channel in Photoshop, or convert the result of get_colour_buffer() to
> RGB format before writing it out.
>
> --
> Tristam MacDonaldhttp://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.

Reply via email to