screenshot
Capture a screenshot or timelapse series from a napari viewer. Specify axis and slice range for temporal sweeps, and save frames to disk.
Instructions
Take a screenshot, or a timelapse series by sweeping a dims axis.
For a single screenshot, call with no axis/slice_range.
For a timelapse, provide both axis and slice_range.
Parameters
canvas_only : bool, default True
If True, only capture the canvas area.
save_path : str, optional
Save single screenshot to this file path (returns metadata).
axis : int, optional
Dims axis to sweep for timelapse (e.g., temporal axis).
slice_range : str, optional
Python-like slice string, e.g. "1:5", ":6", "::2".
Required when axis is provided.
interpolate_to_fit : bool, default False
If True, downsample timelapse frames to fit ~1.3 MB total.
save_dir : str, optional
Save timelapse frames as frame_NNNN.png in this directory.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| canvas_only | No | ||
| save_path | No | ||
| axis | No | ||
| slice_range | No | ||
| interpolate_to_fit | No | ||
| save_dir | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |