save_preview
Save a JPEG preview of a PixInsight view and return its file path, optionally cropping, downsampling, or baking an STF display stretch without changing the original view.
Instructions
Save a JPEG preview of a view and return the file path. Optionally a crop region, a downsample factor, and an STF (display stretch) baked into the pixels: the STF of a view (stf_from) or a linked one given as stf_m and stf_c0. Without an STF the JPEG holds the view's pixel values as they are. The view itself is not changed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| crop | No | Region [x0, y0, x1, y1] of the view in pixels (x1, y1 exclusive); the whole view when omitted | |
| label | Yes | Short label for this preview (e.g. "after_stretch", "final") | |
| stf_m | No | Bake a linked STF with this midtones balance (0 < m < 1) into the JPEG; needs stf_c0 | |
| stf_c0 | No | Shadows clipping point of the linked STF given with stf_m (0 <= c0 < 1) | |
| view_id | Yes | PixInsight view ID | |
| stf_from | No | Bake this view's STF (its display stretch) into the JPEG; the view may be view_id itself. Several previews given the same stf_from are stretched identically | |
| downsample | No | Divide width and height by this factor (>= 1). Omitted: the preview is scaled down to at most 2048 px on its longer side |