Yotsuba Games
Back to Node List

Content Resize

content_resize

Resize image to arbitrary dimensions

Reviewed
Guide available
The node name and summary are available in English. Port, parameter, and article details are currently shown in Japanese.

Input Ports

NameTypeDescription
็”ปๅƒ
input
Image
Required
ๅ…ฅๅŠ›็”ปๅƒ

Output Ports

NameTypeDescription
็”ปๅƒ
output
Image
ใƒชใ‚ตใ‚คใ‚บๅพŒใฎ็”ปๅƒ

Parameters

NameTypeDefaultRangeDescription / Options
ๅน…
width
Int
321โ€“4096

ๅ‡บๅŠ›ๅน…๏ผˆใƒ”ใ‚ฏใ‚ปใƒซ๏ผ‰

้ซ˜ใ•
height
Int
321โ€“4096

ๅ‡บๅŠ›้ซ˜ใ•๏ผˆใƒ”ใ‚ฏใ‚ปใƒซ๏ผ‰

่ฃœ้–“ๆ–นๅผ
sampling
Enum
NearestNeighborโ€”

่ฃœ้–“ๆ–นๅผ

  • ใƒ‹ใ‚ขใƒฌใ‚นใƒˆใƒใ‚คใƒใƒผNearestNeighbor
    ใใฃใใ‚Šใจใ—ใŸใ‚จใƒƒใ‚ธใ€ใƒ‰ใƒƒใƒˆ็ตตใซๆœ€้ฉ
  • ใƒใ‚คใƒชใƒ‹ใ‚ขBilinear
    ๆป‘ใ‚‰ใ‹ใช่ฃœ้–“ใ€ๅ†™็œŸๅ‘ใ

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
Content Resize โ€” PixPipeline Node Reference