Improvements for saving screenshots and animations in ParaView

If you have been using ParaView for a while, you have no doubt encountered at least one of these dialogs:

Save Screenshot Options (v5.3 and earlier)

Save Screenshot Options (v5.3 and earlier)

Save Animation Options (v5.3 and earlier)

Save Animation Options (v5.3 and earlier)

While both configure how images were saved out from ParaView, they unfortunately offer different set of options. Notably, when saving animation dialog doesn’t have options to save a single view (it always saves all views in the app), or change the color palette. Furthermore, the Python API for both of these operations is inconsistent and lacking features. For example, despite having means to change the color palette in the UI, the Python API to SaveScreenshot has no mechanism to do that. Also, one could not simply request an image of specific resolution using the Python API, but instead as a magnification factor of the current view size — which was a major inconvenience, in my opinion.

Changes slated to be available in the next release of ParaView (version 5.4) address these issues. Here are the new versions of these two dialogs:

Save Screenshot Options (v5.4) with advanced options.

Save Screenshot Options (v5.4) with advanced options.

Save Animation Options (v5.4) with advanced options.

Save Animation Options (v5.4) with advanced options.

It is fairly obvious that both have similar options with a few more animation specific parameters in the Save Animation Options dialog. Some of the other salient features of this change are as follows:

Separator Options: when saving multiple views in the active tab (or layout), you can specify a separator width and color directly from this dialog. In the previous versions, these options were configured from the Settings dialog. They have been removed from Settings, and now available when saving images/movies.

Transparent Background: when saving PNGs, this option allows you to save out images with transparent background. This option, like separator options, has moved from Settings dialog, making it more obvious and available when you need it.

Python API: Besides the UI, the Python API too has got a face lift. As always, the easiest way to learn the new Python API is to use Python Tracing capabilities in the UI. Choose options in the dialog as you like, and the trace will generate the  script to do the same in Python. These include simple.SaveScreenshot and simple.SaveAnimation functions. simple.WriteImage and simple.WriteAnimation while still supported are now deprecated and it’s strongly suggested that you update your Python code to use the new methods. Likewise, old arguments to simple.SaveScreenshot which include magnification are also supported, but cannot be used together with the new options. See the ParaView Python API docs for details.

C++ API: These changes have some impact on the C++ API for custom applications. Please check the major API changes page for details and feel free to use the mailing list if you have any issues with porting old code.

p.s. the Python API docs have not refreshed in a while, so the links won’t work till that is fixed.

2 Responses to Improvements for saving screenshots and animations in ParaView

  1. David O. says:

    Moving the ‘transparent background’ checkbox to the save screen/animation dialog boxes will be greatly welcome. I need to toggle this option frequently and am always either forgetting that it’s set/unset, or I’m spending a lot of time hunting and pecking for it in settings.

Questions or comments are always welcome!