Brain.save_image(filename, mode='rgb', antialiased=False, fake_transparency=None)

Save view from all panels to disk

  • filename (string) – Path to new image file.

  • mode ('rgb' | 'rgba') – 'rgb' to render solid background (default), or 'rgba' to include alpha channel for a transparent background.

  • antialiased (bool) –

    Antialias the image (see mayavi.mlab.screenshot() for details; default False).


    Antialiasing can interfere with rgba mode, leading to opaque background.

  • fake_transparency (Optional[Any]) – Use this color as background color and make it transparent. Workaround if mode='rgba' is broken.

See also


grab current image as array


Due to limitations in TraitsUI, if multiple views or hemi=’split’ is used, there is no guarantee painting of the windows will complete before control is returned to the command line. Thus we strongly recommend using only one figure window (which uses a Mayavi figure to plot instead of TraitsUI) if you intend to script plotting commands.