# Composite and finish existing images

> Key a foreground, color-correct and position it, merge it over a background in a Nodespell Image Compositor, then crop and download the finished frame.

Source: https://docs.nodespell.com/recipes/composite-and-finish/ · Last updated: 2026-11-10

The Nodespell composite-and-finish recipe builds one finished still from images you already have. You bring a foreground and a background into an Image Compositor, pull a matte with Keyer, match the foreground with Color Correct, place it with Transform, merge it over the background, then crop and download. Compositor nodes run in the editor, so this recipe uses no generation credits.

**What you need**

- A foreground image (for example, a subject shot on a green or blue screen, or a cutout from [Remove Background](https://docs.nodespell.com/creative-tools/remove-background/)).
- A background image.
- Both images in [Asset Manager](https://docs.nodespell.com/assets/asset-manager/), or as results on nodes in your Project.

**Graph at a glance:** Background Asset + Foreground Asset → Image Compositor { Compositor Input → Keyer → Color Correct → Transform → Merge → Compositor Output } → Crop → download

> **Credits:** Keyer, Color Correct, Transform, Merge, and Crop are image-processing nodes, not model runs, so they do not use credits. You spend credits only if you generate a missing ingredient, such as a background from Image Generator.

## Stage 1: Bring the images into an Image Compositor

1. Open the Project in **Graph** mode.
2. Press `Tab` and add an **Asset** node for the background. Right-click it, choose **Load Asset**, and pick the background image. Repeat for the foreground.
3. Press `Tab` and add **Image Compositor**.
4. Connect the background Asset to the Image Compositor **Images** input first, then connect the foreground Asset. The connection order sets each image's index: the first is 0, the second is 1.
5. Select the Image Compositor node and set **Canvas size**, for example **First input** to match the background, or a preset such as **1080p Landscape · 1920 × 1080**.

Image Compositor is the still-image compositor; **Compositor** is the time-based version for video. See [Compositing](https://docs.nodespell.com/edit/compositing/).

## Stage 2: Pull the foreground matte

1. Select the Image Compositor and press `Enter`, or right-click it and choose **Enter Node**. A new compositor already contains a **Compositor Input** connected to a **Compositor Output**.
2. Select the existing Compositor Input and leave **Index** at `0`. This is the background.
3. Press `Tab` and add a second **Compositor Input**. Set its **Index** to `1`. This is the foreground.
4. Press `Tab`, add **Keyer**, and connect the foreground Compositor Input to it.
5. Choose the keying mode that matches the footage: **Green Screen**, **Blue Screen**, **Red Screen**, **Chroma Distance**, **Luminance**, or **Saturation**.
6. Adjust **Screen Color**, **Clip Black**, and **Clip White** until the background is clean and the subject is solid. Set **Output** to **Matte View** while you tune, then back to **Write Alpha**.

If the foreground is already a cutout with transparency, skip Keyer. Add **Erode/Dilate** after Keyer when the matte edge needs to shrink or grow. See [Masks and keying](https://docs.nodespell.com/edit/masks-and-keying/).

## Stage 3: Match the color and place the foreground

1. Add **Color Correct** after Keyer. Choose **Mode** (**Lift Gamma Gain** or **Shadows Midtones Highlights**) and use **Color Wheels** to match the foreground's blacks, midtones, and highlights to the background.
2. Add **Transform** after Color Correct. Scale, move, and rotate the foreground into place. Choose a **Filter** (for example **Lanczos 3**) for sharper resampling.

See [Color correction](https://docs.nodespell.com/edit/color-correction/) and [Transforms and crop](https://docs.nodespell.com/edit/transforms-and-crop/).

## Stage 4: Merge and output

1. Add **Merge**.
2. Connect the background Compositor Input to **Background** and the Transform output to **Foregrounds**.
3. Leave **Mode** on **Over** to place the foreground on top. Lower the mix to blend it.
4. Connect the Merge output to **Compositor Output**, replacing the default connection from the first Compositor Input.
5. Press `U` to return to the parent graph.

**Merge** offers many blend modes, including **Screen**, **Multiply**, **Overlay**, and a **Custom** mode with expressions for **Colour** and **Alpha**. See [Compositing](https://docs.nodespell.com/edit/compositing/).

## Stage 5: Crop and download

1. Back in the parent graph, press `Tab`, add **Crop**, and connect the Image Compositor **Image** output to it.
2. Select Crop. Drag the handles in the Design panel viewer to set the frame. Hold `Shift` to lock the aspect ratio and `Option/Alt` to resize from the center.
3. Right-click the Crop node and choose **Download**.

See [Export](https://docs.nodespell.com/edit/export/) for download options.

## Check the result

- Select the Image Compositor. The Design panel shows the composite, and you can zoom to inspect the matte edge.
- Temporarily set Keyer **Output** to **Matte View** and look for gray holes in the subject or specks in the background.
- Select the original foreground Asset and the Crop node together to compare them as A and B in the Design panel.

## Variations

- **Several foregrounds.** Connect more images to **Images** (indices 2, 3, …) and feed each prepared layer into **Foregrounds** of the same Merge.
- **Grade the whole frame.** Add Color Correct or **Grade** after Merge, inside the compositor, so the correction applies to the assembled image.
- **Composite a video shot.** Use **Compositor** instead of Image Compositor when the background or foreground is a video, then render and download its video output.
- **Add depth effects.** Feed a depth map into the same compositor and add ZDefocus or Depth Atmosphere; see [Refocus with depth and add atmosphere](https://docs.nodespell.com/recipes/depth-refocus-and-atmosphere/).

## Frequently asked questions

### Why does my compositor show only the background?

The default Compositor Output is connected to the first Compositor Input. Connect the Merge output to **Compositor Output** instead.

### How does a Compositor Input know which image to use?

**Index** is a zero-based position in the parent compositor's **Images** input, in connection order. The first connected image is `0`.

### Can I use Keyer outside a compositor?

Yes. Keyer, Color Correct, Transform, and Crop also work in the main graph. Merge and Compositor Input work only inside a compositor.

### How do I get back out of the compositor?

Press `U` to go up one level to the parent graph.

## Related

- [Compositing](https://docs.nodespell.com/edit/compositing/) — compositor types, inputs, and Merge modes
- [Masks and keying](https://docs.nodespell.com/edit/masks-and-keying/) — Keyer and matte tools in depth
- [Color correction](https://docs.nodespell.com/edit/color-correction/) — Color Correct, Curves, and Hue Correct
- [Transforms and crop](https://docs.nodespell.com/edit/transforms-and-crop/) — Transform, Resize, and Crop
- [Export](https://docs.nodespell.com/edit/export/) — download finished media
