Back to Node List

Canvas Resize

canvas_resize

Resize the canvas without scaling the image content

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
641–8192

新しいキャンバスの幅

高さ
height
Int
641–8192

新しいキャンバスの高さ

アンカー
anchor
Enum
Center

元画像の配置位置

  • 左上Top-Left
  • 上中央Top-Center
  • 右上Top-Right
  • 左中央Center-Left
  • 中央Center
  • 右中央Center-Right
  • 左下Bottom-Left
  • 下中央Bottom-Center
  • 右下Bottom-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
Canvas Resize — PixPipeline Node Reference