I use the following line from Pyglet docs to save screenshots in my OpenGL applications: pyglet.image.get_buffer_manager().get_color_buffer().save(shotfile) I have compiled Pyglet with USE=image to allow multiple image formats, so it uses dev-python/pillow. After updating Pillow from 7.2.0 to 8.0.0, this fails with the following error: File "/usr/lib/python3.7/site-packages/pyglet/image/__init__.py", line 499, in save encoder.encode(self, file, filename) File "/usr/lib/python3.7/site-packages/pyglet/image/codecs/pil.py", line 135, in encode image_from_fn = getattr(Image, "frombytes", getattr(Image, "fromstring")) File "/usr/lib/python3.7/site-packages/PIL/Image.py", line 62, in __getattr__ raise AttributeError(f"module '{__name__}' has no attribute '{name}'") AttributeError: module 'PIL.Image' has no attribute 'fromstring' I have tested both latest dev-python/pyglet-1.5.8 and the previous 1.5.7-r1. Presumably, Pyglet needs to be updated to work with Pillow 8. In the meantime, Pyglet dependencies should disallow Pillow versions 8 or higher.
Could you try with the newest pyglet version?
(In reply to Michał Górny from comment #1) > Could you try with the newest pyglet version? Tested Pyglet 1.5.13 with Pillow 8.0.1 and it works fine :)
Thank you!