Studio Yotsuba
Back to Node List

Content Resize

content_resize

Resize image to arbitrary dimensions

Reviewed
Guide available

Input Ports

NameTypeDescription
Image
input
Image
Required
Input image

Output Ports

NameTypeDescription
Image
output
Image
Resized image

Parameters

NameTypeDefaultRangeDescription / Options
Width
width
Int
321–4096

Output width in pixels

Height
height
Int
321–4096

Output height in pixels

Method
sampling
Enum
NearestNeighbor—

Interpolation method

  • NearestNeighborNearestNeighbor
    Sharp edges, best for pixel art
  • BilinearBilinear
    Smooth interpolation, good for photos

Overview

Resizes an image to any dimensions. Use it for non-integer scaling such as 48×48 → 32×32, which integer-only pixel_scale cannot handle.

Usage tips

  • Choose among the three resize tools by intent: integer scaling = pixel_scale (preserves pixels), fitting dimensions by adding or removing margins = canvas_resize / fit_to_canvas, stretching the artwork itself to arbitrary dimensions = Content Resize.
  • Non-integer downscaling inevitably distorts pixel art. Treat this as a tool for cases where matching the dimensions matters more than preserving the pixels, such as importing external assets.
  • Use NearestNeighbor (the default) for pixel art. Bilinear is for preparing photographic material. It interpolates translucent edges in premultiplied-alpha space, preventing hidden RGB in transparent pixels from creating dark or colored fringes.

Related nodes

  • pixel_scale — lossless integer scaling
  • canvas_resize / fit_to_canvas — match dimensions through canvas operations
  • image_load — import external assets (the main upstream node for this one)

Sampling modes

Method Label Description
NearestNeighbor Nearest neighbor Crisp edges; ideal for pixel art
Bilinear Bilinear Smooth interpolation; suited to photos and natural images

Technical details

  • Same dimensions: passes the image through without copying it, which is fast
  • Nearest neighbor: takes the nearest pixel as-is; works with non-integer scaling
  • Bilinear: interpolates the four surrounding pixels in premultiplied-alpha space, producing intermediate colors without exposing hidden RGB; fully transparent results are canonical transparent black

Examples

Change the resolution from 32 to 64px

Scale 32×32 pixel art up with width: 64, height: 64, and sampling: NearestNeighbor.

Non-integer resizing

Scale a 48×48 image down to width: 32, height: 32 (a non-integer ratio that Pixel Scale cannot handle).

Differences from PixelScale

Item ContentResize PixelScale
Size specification Arbitrary (width × height) Integer factors only (×N / ÷N)
Sampling NN or Bilinear NN only
Purpose Convert to arbitrary dimensions Dedicated to integer upscaling and downscaling
Back to Node List