CompStart

ProLessonsCoursesElementsSoftware

CompStart

Master visual effects with cutting-edge techniques.

Learning

CoursesLessonsPro FeaturesAssetsSoftware

Tools

Tech CheckDisplay CheckMotion BlurCIE 1931PhysLightNuke Tools

Company

InstructorMissionImpressumPrivacyTerms

Projects

Moray RenderEXR ConverterOCIO.ccNuke ToolsDerekVFX

Follow

YouTubeInstagramTikTokThreadsContact

© 2026 CompStart. All rights reserved.

Letterbox Trim

ToolSets / Utility
Utility

2026-09-07

ToolSets/utility/letterBoxTrim.nk

utility
crop
letterbox
bbox
trim
format
soft crop
View on GitHub

Shrinks the input bounding box from top and bottom to trim letterbox bars with a soft crop.

Letterbox Trim shrinks the input bounding box from the top and bottom. Top and bottom pixel offsets drive an internal Crop with crop disabled, so only the bbox is updated.

Use it on letterboxed plates or renders when black bars should leave the format for downstream work without a full reformat.

Horizontal edges stay tied to the input bbox. Defaults trim one pixel top and bottom; raise the values to match bar thickness. Soft crop leaves outside pixels intact if a later node expands the format.

Script code

set cut_paste_input [stack 0]
version 12.1 v5
push $cut_paste_input
Group {
 name letterboxTrim
 tile_color 0x421010ff
 selected true
 xpos 15476
 ypos 4843
 addUserKnob {20 letterboxTrim}
 addUserKnob {41 top T Crop1.top}
 addUserKnob {41 bottom T Crop1.bottom}
 addUserKnob {26 "" +STARTLINE}
 addUserKnob {26 lbl l "" +STARTLINE T "Letterbox Trim v0.1"}
}
 Input {
  inputs 0
  name Input
  xpos 444
  ypos 258
 }
 Crop {
  box {{input.bbox.x} {"input.bbox.y + bottom"} {"input.bbox.width + input.bbox.x"} {"input.bbox.height + input.bbox.y - top"}}
  crop false
  name Crop1
  xpos 444
  ypos 298
  addUserKnob {20 User}
  addUserKnob {3 top}
  top 1
  addUserKnob {3 bottom}
  bottom 1
 }
 Output {
  name Output1
  xpos 444
  ypos 398
 }
end_group