A quick two-image blender — pick A and B from your open views, choose a blend mode, drag the opacity, and the result overwrites A. A compact alternative to the full Layers editor for the common case of “just combine these two images.”
Both Source A and Source B dropdowns list every open document with an image. The dropdowns repopulate every time the dialog is shown, so loading a new view and reopening Image Combine always picks it up. The first time you open the dialog it auto-selects the currently active document as A and the next available document as B.
A and B must have the same width and height. If they don't match, the preview area shows Images must be the same size. and Apply refuses with a warning. Channel count may differ: a mono B blended into an RGB A applies the same mono value to all three channels of A, and vice versa.
Nine blend modes are available in the Mode dropdown. The Opacity slider (0–100%) controls how strongly the mode's result replaces A. The exact mapping differs by mode:
| Mode | What it does | Opacity meaning |
|---|---|---|
| Average | Equal-weight mix of A and B. | Ignored. Always 50/50. |
| Blend | Straight alpha mix between A and B. | 0 = A only; 100 = B only. |
| Add | A + B, clipped to [0, 1]. | Fades the sum back toward A. |
| Subtract | A − B, clipped to [0, 1]. | Fades the difference back toward A. |
| Multiply | A × B — always darkens. | Fades toward A. |
| Divide | A ÷ (B + ε), clipped — often used for flat-fielding style corrections. | Fades toward A. |
| Screen | Standard screen compositing — always brightens. | Fades toward A. |
| Overlay | Combines multiply (shadows) and screen (highlights) at A's midpoint — classical contrast-enhancing blend. | Fades toward A. |
| Difference | Absolute difference |A − B| — useful for change-detection or aligning subs. | Fades toward A. |
In short, Blend and Average interpolate between A and B; every other mode computes a blend result and then fades from A toward that result as Opacity rises. See §7.1 for the exact mix formula.
Tick Combine luminance only (keep A's color) to apply the chosen blend mode to the luminance of A and B while preserving A's colour balance. A must be RGB (the mode is refused on mono A with a message in the preview area). The pipeline is:
This is the right mode for things like synthetic luminance (screen a mono Hα or luma-stacked frame into an RGB without colour-shifting), sharpening via a sharper luma layer, or denoised-luma overlay.
If Source A has an active mask, Image Combine respects it automatically — the blend result is let through where the mask is 1 and A is held intact where the mask is 0, following SASpro's standard mask convention. No per-tool mask picker is needed; whatever mask is active on A is the mask you get. Tick Invert mask to flip that behaviour.
Tick Show mask overlay to render a translucent red wash over the preview wherever A is protected (mask value near 0). The Overlay opacity slider (5–95%) controls how strong the wash is. This is a preview-only aid — the overlay is not baked into the Apply output. Use it to confirm your mask is doing what you expect before committing.
If no mask is active on A, the overlay checkbox is a no-op; the preview and the Apply result both come straight from the blend.
The preview updates live as you change any control. A short debounce keeps slider interaction smooth.
Apply commits the current preview to Source A in place via A.set_image(result, step_name="Image Combine: <mode>"). The operation is recorded in A's undo history under that name, so you can roll it back from History and the step shows up in Replay. B is never modified.
Close dismisses the dialog without applying. The dialog is non-modal, so you can leave it open and keep working in SASpro; it will pick up new views on next show.
The compositor, in order of application.
Modes other than Average and Blend compute a blend result f(A, B) and then interpolate between A and that result by Opacity:
with α in [0, 1] from the Opacity slider. At α = 0 the output is A unchanged; at α = 1 the output is the full mode's result. Average ignores α entirely:
and Blend uses α as the direct interpolation parameter between A and B themselves:
Each produces the f(A, B) used in the mix formula above. All operate per-channel in float32 with inputs clipped to [0, 1].
Add and Subtract — linear combination, clipped:
Multiply — darkening operator (no clip needed since inputs are already in [0, 1]):
Divide — brightening/correcting operator with a small ε = 10-6 guard against division by zero:
Screen — classical screen compositing (complement of multiplicative darkening):
Difference — absolute per-pixel residual:
Overlay is piecewise — multiply in the shadows of A, screen in the highlights, hinged at A's midpoint. For A ≤ 0.5:
and for A > 0.5:
The hinge at 0.5 means Overlay preserves the midtone of A while compressing shadows (into multiply) and expanding highlights (into screen), producing the familiar contrast-boosting look.
With Combine luminance only ticked, A must be RGB. Both images are reduced to Rec. 709 luminance:
The chosen mode is then applied to the two luma channels at the chosen opacity:
and the result is re-combined with A's original colour using SASpro's linear-scale luminance recombiner (shared with LRGB combination, EZ Soft Stretch and the colour-preserving stretch tools):
The recombiner scales A's RGB vector at each pixel so its new luminance equals Ymix while preserving its chromaticity — so hue and saturation stay exactly as they were in A, and only the brightness distribution reflects B.
If A has an active mask m (values in [0, 1], resized to the image via nearest-neighbour and expanded to the right channel count), the final blend is further gated by:
where r is the mode's blended result (post-opacity) and A is the unmodified source. By convention, m = 1 means “full effect” and m = 0 means “protected”; Invert mask swaps that. The mask is pulled from the destination document (A) first; if A has no per-document mask, SASpro falls back to the globally applied mask on the Image Manager if one is set.
In luma-only mode the mask gates Ymix against YA before the recombine, so protected pixels end up with A's original luminance and chroma untouched.
The optional red overlay shows A's protected region (where the blend will not take effect):
with ω the Overlay opacity (5–95%) and r = pure red (R=1, G=B=0). Mono previews are first promoted to RGB so the wash is visible. The overlay is applied after the mask-gated blend, so what you see as a red wash is “here the output is A unchanged” — useful for spotting unexpected mask leakage before committing.
Masks whose resolution doesn't match the image are resampled with nearest-neighbour interpolation (cv2.resize with INTER_NEAREST when OpenCV is available, otherwise a NumPy index-map fallback) — the preview and Apply paths use the same resampler, so what you see is what gets committed. The preview itself uses Qt's smooth scaled pixmap for display, scaled on demand when the zoom changes rather than re-rendering the blend. Session state (geometry, selections by document name, mode, opacity, flags, overlay settings and zoom) is persisted via QSettings under the image_combine/ key, written on slider-release and on close.