image.get_buffer_manager().get_color_buffer().save('out.png')
but it saves the alpha channel. I tried switching it to .BMP (since
that format doesn't support an alpha channel) but pyglet refuses to
write a BMP from RGBA data.
How can I easily drop the alpha channel from the image? I've tried
several things with the image classes but I can't seem to figure this
out.
> How can I easily drop the alpha channel from the image? I've tried
> several things with the image classes but I can't seem to figure this
> out.
>
Use the ImageData class to reformat the image. Something like (untested)::
img = image.get_buffer_manager().get_color_buffer().image_data
img.format = 'RGB'
img.save('out.png')
Alex.