Pixel Scale

Transforms an image using Pixel Scale. Modifies the spatial properties of the input image.

basic
Since P00

Input Ports

Image

Input image

Image

Output Ports

Image

スケール後のimage

Image

Parameters

NameTypeDefaultDescription
ModeEnumEnlarge拡大(×N)または縮小(÷N)
ScaleInt2整数倍率

Technical Details

  • 補間方式: ニアレストネイバー(最近傍補間)
  • 拡大 (Enlarge): Output size = input_width × scale × input_height × scale
  • 縮小 (Reduce): Output size = input_width ÷ scale × input_height ÷ scale(Nピクセルおきにサンプリング)
  • scale=1: Input imageをそのままPathスルー(コピーなし、高速)
  • 縮小時に1未満になる場合は最小1pxに制限

Usage Examples

ゲームエンジン用2×拡大

32×32のドット絵を mode: Enlarge, scale: 2 → 64×64のpixel-perfectなimage。

サムネイル用縮小

64×64のimageを mode: Reduce, scale: 2 → 32×32にダウンサンプリング。

プレビュー用3×拡大

16×16のアイコンを mode: Enlarge, scale: 3 → 48×48の鮮明なプレビューimage。

Transform ノードとの違い

項目PixelScaleTransform
目的スケーリング専用(拡大・縮小)Translate・スケール・Rotate・Flipの汎用変換
パラメータ`mode` + `scale` のみ`offset_x/y`, `scale`, `rotation`, `flip_h/v`
適用場面エクスポート・プレビュー・サムネイルグラフ内でのimage変換

💡 Tips

  • **補間方式**: ニアレストネイバー(最近傍補間)
  • **拡大 (Enlarge)**: Output size = `input_width × scale` × `input_height × scale`
  • **縮小 (Reduce)**: Output size = `input_width ÷ scale` × `input_height ÷ scale`(Nピクセルおきにサンプリング)
  • **scale=1**: Input imageをそのままPathスルー(コピーなし、高速)
  • 縮小時に1未満になる場合は最小1pxに制限
Pixel Scale — PixPipeline Node Reference