resample_image
Modifies pixel dimensions via whole-factor binning or enlargement, proportional rescaling, or copying a reference view's width and height.
Instructions
Change an image's pixel dimensions. mode "integer": IntegerResample by a whole factor (factor 2 bins 2x2 into one pixel with the given downsampling combination; enlarge: true multiplies the size instead). mode "scale": Resample by a relative factor (0.5 halves each side). mode "to_reference": Resample to exactly the width and height of reference_id. Runs in place, or on a copy named output_id that carries the keywords, astrometric solution and view properties. FITS keywords are kept. PixInsight removes the astrometric solution in these processes; the result states whether a solution was present before and after. Runs without the geometry confirmation dialog (noGUIMessages).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | integer (IntegerResample), scale (Resample by a factor) or to_reference (Resample to reference_id's size) | |
| factor | No | integer: whole bin/zoom factor >= 2. scale: relative size factor > 0 | |
| enlarge | No | integer mode: multiply the size by factor instead of dividing it (default false) | |
| view_id | Yes | View to resample | |
| output_id | No | Resample a copy with this view id instead of the view itself | |
| downsampling | No | integer mode: how binned pixels combine (default Average) | |
| reference_id | No | to_reference: the view whose width and height the result takes | |
| interpolation | No | scale / to_reference: Resample interpolation; omitted, PixInsight's default |