# Reformat

> Resizes the image to another format, box or scale, with a choice of filter.

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

![Reformat properties](/shots/nodes/reformat@2x.webp)

## Inputs and outputs

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

## Knobs

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

| Knob | Label | Type | Default | Range / values | .nk knob | Description |
|---|---|---|---|---|---|---|
| `reformat_type` | type | menu | `TO_FORMAT` | TO_FORMAT (to format), TO_BOX (to box), SCALE (scale) | `type` |  |
| `format` | output format | menu | `HD_1080` | PC_Video (PC_Video 640x480), NTSC (NTSC 720x486 0.91), PAL (PAL 720x576 1.09), NTSC_16:9 (NTSC_16:9 720x486 1.21), PAL_16:9 (PAL_16:9 720x576 1.46), HD_720 (HD_720 1280x720), HD_1080 (HD_1080 1920x1080), UHD_4K (UHD_4K 3840x2160), 1K_Sup... |  |  |
| `box_width` | width/height | float | `200` | 1 to 8192 (integer) | `box_width` |  |
| `box_height` | height | float | `200` | 1 to 8192 (integer) | `box_height` |  |
| `box_fixed` | force this shape | bool | `false` |  | `box_fixed` |  |
| `box_pixel_aspect` | pixel aspect | float | `1` | 0.1 to 4 | `box_pixel_aspect` |  |
| `scale` | scale | wh ×2 | `1, 1` | 0 to 4 | `scale` |  |
| `resize` | resize type | menu | `WIDTH` | NONE (none), WIDTH (width), HEIGHT (height), FIT (fit), FILL (fill), DISTORT (distort) | `resize` |  |
| `center` | center | bool | `true` |  | `center` |  |
| `flip` | flip | bool | `false` |  | `flip` |  |
| `flop` | flop | bool | `false` |  | `flop` |  |
| `turn` | turn | bool | `false` |  | `turn` |  |
| `filter` | filter | menu | `CUBIC` | IMPULSE (Impulse), CUBIC (Cubic), KEYS (Keys), SIMON (Simon), RIFMAN (Rifman), MITCHELL (Mitchell), PARZEN (Parzen), NOTCH (Notch), LANCZOS4 (Lanczos4), LANCZOS6 (Lanczos6), SINC4 (Sinc4) | `filter` |  |
| `clamp` | clamp | bool | `false` |  | `clamp` |  |
| `black_outside` | black outside | bool | `true` |  | `black_outside` |  |
| `pbb` | preserve bounding box | bool | `false` |  | `pbb` |  |

### 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 |
|---|---|
| `type` | `reformat_type` |

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.

- **Read input transform: ACES2065-1 frame** (`examples/color/read_aces_input_transform.oink`): One 4K frame of Netflix's Sparks (CC BY 4.0, Netflix Open Content): scene-linear ACES2065-1 with no chromaticities in the file, so the Read's input transform is set to ACES2065-1 by hand. The Reformat brings the 4096x2160 frame down to HD for a light comp.
- **Transform: translate, rotate, scale** (`examples/transform/transform_basics.oink`): Transform works in Nuke pixels (y up, degrees counter-clockwise, around "center"). The Reformat first puts the photo in an HD frame so the rotated corners have room.


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