Skip to content
Snippets Groups Projects
Commit 24cb4f84 authored by Egli Adrian (IT-SCI-API-PFI)'s avatar Egli Adrian (IT-SCI-API-PFI)
Browse files

FAQ

parent 3dc03373
No related branches found
No related tags found
No related merge requests found
...@@ -39,3 +39,9 @@ Frequently Asked Questions (FAQs) ...@@ -39,3 +39,9 @@ Frequently Asked Questions (FAQs)
.. _importlib-resources: https://importlib-resources.readthedocs.io/en/latest/ .. _importlib-resources: https://importlib-resources.readthedocs.io/en/latest/
Renders the scene into a image (screenshot)
.. code-block:: python
renderer.gl.saveImage("filename.bmp")
...@@ -219,6 +219,10 @@ class PILGL(GraphicsLayer): ...@@ -219,6 +219,10 @@ class PILGL(GraphicsLayer):
return array(img) return array(img)
def saveImage(self, filename): def saveImage(self, filename):
"""
Renders the current scene into a image file
:param filename: filename where to store the rendering output (supported image format *.bmp , .. , *.png)
"""
img = self.alpha_composite_layers() img = self.alpha_composite_layers()
img.save(filename) img.save(filename)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment