# Crop

> Cuts the image to a box; outside is black, or the format is reset to the box.

| Node | Crop |
|---|---|
| Menu | Transform › Crop |
| **Names in each format** | |
| .oink comp (JSON) | `"type": "OC_N_crop"` |
| .nk script | `Crop` ([how .nk import works](/docs/nuke-users/nk-import)) |
| Python | `nuke.createNode("Crop")` |
| Assistant (MCP) | `create_node(type="Crop")` |
| Tab search | `crop` |

![Crop properties](/shots/nodes/crop@2x.webp)

## Inputs and outputs

| Port | Name | Type |
|---|---|---|
| input 0 | Image | image |
| output 0 | Image | image |

## Knobs

Panel tab **Crop**, in panel order.

| Knob | Label | Type | Default | Range / values | .nk knob | Description |
|---|---|---|---|---|---|---|
| `left` | box | float | `0` | -1000 to 8192 |  |  |
| `bottom` | y | float | `0` | -1000 to 8192 |  |  |
| `right` | r | float | `1920` | 0 to 8192 |  |  |
| `top` | t | float | `1080` | 0 to 8192 |  |  |
| `softness` | softness | float | `0` | 0 to 100 | `softness` |  |
| `reformat` | reformat | bool | `false` |  | `reformat` |  |
| `intersect` | intersect | bool | `false` |  | `intersect` |  |
| `black_outside` | black outside | bool | `true` |  | `crop` |  |

### Other knobs (Python, .nk and the assistant; not on the panel)

| Knob | Label | Type | Default | Range / values | .nk knob | Description |
|---|---|---|---|---|---|---|
| `gl_color` | Viewer Controls Color | float ×3 | `0, 0, 0` | 0 to 1 |  |  |
| `postage_stamp_frame` | Static Frame | int | `1` | -2147483648 to 2147483647 |  |  |
| `lifetimeStart` | Lifetime Start | int | `0` | -2147483648 to 2147483647 |  |  |
| `lifetimeEnd` | Lifetime End | int | `100` | -2147483648 to 2147483647 |  |  |
| `useLifetime` | Use Lifetime | boolean | `false` |  |  |  |
| `cached` | Cached | boolean | `false` |  |  |  |
| `bookmark` | Bookmark | boolean | `false` |  |  |  |
| `dope_sheet` | Dope Sheet | boolean | `false` |  |  |  |
| `clone_group` | Clone Group | string |  |  |  |  |
| `link_source` | Link Source | string |  |  |  |  |
| `link_overrides` | Link Overrides | string |  |  |  |  |
| `split_views` | Split Views | string |  |  |  |  |

## Knob names in .nk scripts

| .nk knob | Knob here |
|---|---|
| `crop` | `black_outside` |

Other .nk knobs use the same name here. See [.nk import](/docs/nuke-users/nk-import).

## Examples

Open these from **Help › Examples…**, or from the **?** menu in this node's Properties panel.

- **Data window outside the display window** (`examples/io/read_data_window.oink`): openexr-images DisplayWindow/t08.exr: 400x300 pixels whose data window starts at (30, 40) inside a 501x401 display window. The Read keeps the whole data window as the bounding box; the Crop cuts it back to the format, like Nuke.


---
Sources: opencomp_core/nodes/transform/crop.py, opencomp_electron/src/components/properties/knobSchema.ts, opencomp_core/nk/mapping.py
