Studio Yotsuba
Back to Node List

Canvas Resize

canvas_resize

Resize the canvas without scaling the image content

Reviewed
Guide available

Input Ports

NameTypeDescription
Image
input
Image
Required
Input image

Output Ports

NameTypeDescription
Image
output
Image
Resized canvas

Parameters

NameTypeDefaultRangeDescription / Options
Width
width
Int
641–8192

New canvas width

Height
height
Int
641–8192

New canvas height

Anchor
anchor
Enum
Center—

Anchor position for the original image

  • Top-LeftTop-Left
  • Top-CenterTop-Center
  • Top-RightTop-Right
  • Center-LeftCenter-Left
  • CenterCenter
  • Center-RightCenter-Right
  • Bottom-LeftBottom-Left
  • Bottom-CenterBottom-Center
  • Bottom-RightBottom-Right

Overview

Changes only the "paper size" while leaving the artwork itself unchanged. Expanded areas become transparent; reducing the canvas crops the artwork. Use it to reserve room for effects or movement, or to standardize assets to a required size such as 32×32.

Usage tips

  • Reserving room before an effect is the most common use. Expand the canvas before outline, drop_shadow, glow, or a movement animation to prevent overflow from being clipped.
  • To standardize sprites, set width/height to the required values and position each asset with anchor. Bottom-Center is the go-to choice for aligning character feet.
  • To enlarge the artwork itself, use pixel_scale for integer scaling. This node does not change the artwork by even one pixel.
  • Consider fit_to_canvas or content_resize when you need to trim to the content automatically or fit the content within a canvas.

Common pitfalls

  • The artwork moved to the center / should be at an edge: anchor specifies where to place the source image. Use Bottom-Center for a character or the appropriate corner for a UI corner piece.
  • Reducing the canvas removed part of the artwork: reducing dimensions crops, just like Crop. If nothing should be lost, shrink the content first with content_resize or a similar node.
  • The expanded area looks black: new areas are transparent; black is only the preview background. For colored padding, composite the image over solid_color with blend.

Technical details

This node expands or reduces the canvas frame rather than scaling the image. Expanded areas are transparent.

Related nodes

  • crop — extract an area using explicit coordinates
  • fit_to_canvas / content_resize — resize while scaling the content
  • pixel_scale — scale the artwork itself by an integer factor
  • outline / drop_shadow — representative downstream nodes that need extra room
Back to Node List