Studio Yotsuba
Back to Node List

Crop

crop

Extract a fixed-size rectangle; areas outside the source are transparent

Reviewed
Guide available

Input Ports

NameTypeDescription
Image
input
Image
Required
Input image

Output Ports

NameTypeDescription
Image
output
Image
Fixed-size cropped image with transparent out-of-bounds areas

Parameters

NameTypeDefaultRangeDescription / Options
X
x
Int
00–10000

Left edge of crop region

Y
y
Int
00–10000

Top edge of crop region

Width
width
Int
321–8192

Width of crop region

Height
height
Int
321–8192

Height of crop region

Overview

Extracts a rectangular area from an image using coordinates. Use it to take one frame from a sprite sheet, extract the needed area from a large reference image, or remove padding.

Usage tips

  • A frame in a sprite sheet is determined mechanically by x = column × frame width, y = row × frame height. Turn x into a variable and iterate it with batch_render to process every frame at once. If you want to treat the input as a sprite sheet, the dedicated sprite_sheet_frame_get is easier.
  • To keep the artwork unchanged and only narrow the canvas, use canvas_resize, which supports anchor-based placement such as centering. Crop uses coordinates from the top-left origin.
  • Keep coordinates pixel-accurate. Zoom in on the preview boundary before finalizing it.
  • The output is always exactly width × height. Areas outside the source—including a rectangle entirely beyond the source—are transparent.

Common pitfalls

  • The edge is off by 1px: x/y are zero-based. The second frame starts at x = コマ幅×1.
  • The selection extends beyond the image: the output size stays fixed and the overflow becomes transparent. Check x+width and y+height if transparency is unexpected.
  • Transparent padding should be removed automatically: consider automatic trimming with a content_resize-family node instead of finding coordinates by hand.

Related nodes

  • canvas_resize — anchor-based canvas expansion or reduction, including centering
  • sprite_sheet_frame_get — dedicated frame extraction from a sprite sheet
  • content_resize — resize to the content
  • blend — reposition an extracted part
Back to Node List