visbrain.objects.GridSignalsObj.screenshot¶
-
GridSignalsObj.
screenshot
(self, saveas, print_size=None, dpi=300.0, unit='centimeter', factor=None, region=None, autocrop=False, bgcolor=None, transparent=False, obj=None, line_width=1.0, **kwargs)[source]¶ Take a screeshot of the scene.
By default, the rendered canvas will have the size of your screen. The screenshot() method provides two ways to increase to exported image resolution :
Using print_size, unit and dpi inputs : specify the size of the image at a specific dpi level. For example, you might want to have an (10cm, 15cm) image at 300 dpi.
Using the factor input : multiply the default image size by this factor. For example, if you have a (1920, 1080) monitor and if factor is 2, the exported image should have a shape of (3840, 2160) pixels.
- Parameters
- saveasstr
The name of the file to be saved. This file must contains a extension like .png, .tiff, .jpg…
- print_sizetuple | None
The desired print size. This argument should be used in association with the dpi and unit inputs. print_size describe should be a tuple of two floats describing (width, height) of the exported image for a specific dpi level. The final image might not have the exact desired size but will try instead to find a compromize regarding to the proportion of width/height of the original image.
- dpifloat | 300.
Dots per inch for printing the image.
- unit{‘centimeter’, ‘millimeter’, ‘pixel’, ‘inch’}
Unit of the printed size.
- factorfloat | None
If you don’t want to use the print_size input, factor simply multiply the resolution of your screen.
- regiontuple | None
Select a specific region. Must be a tuple of four integers each one describing (x_start, y_start, width, height).
- autocropbool | False
Automaticaly crop the figure in order to have the smallest space between the brain and the border of the picture.
- bgcolorarray_like/string | None
The background color of the image.
- transparentbool | False
Specify if the exported figure have to contains a transparent background.
- objVisbrainObj | None
Pass a Visbrain object if you want to use the camera of an other object for the sceen rendering.
- kwargsdict | {}
Optional arguments are passed to the VisbrainCanvas class.