> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# 图像拼接（ImageStitch）

<div class="node-meta"><code>ImageStitch</code><span>image/transform</span><span>角色：图像处理</span><span class="star">★ 常用节点</span></div>

此节点允许您将两张图像沿指定方向（上、下、左、右）拼接在一起，并支持尺寸匹配和图像间距设置。

## 参数

| 参数                 | 类型           | 默认 / 范围                      | 说明    |
| ------------------ | ------------ | ---------------------------- | ----- |
| `image1`           | IMAGE · 图像   | —（连线输入）                      | 第一张图。 |
| `direction`        | COMBO        | right、down、left、up           | —     |
| `match_image_size` | BOOLEAN · 布尔 | true / false                 | —     |
| `spacing_width`    | INT          | 0 \~ 1024，步长 2               | —     |
| `spacing_color`    | COMBO        | white、black、red、green …共 5 项 | —     |
| `image2`（选填）       | IMAGE · 图像   | —（连线输入）                      | 第二张图。 |

## 输出

| 输出    | 类型    | 说明 |
| ----- | ----- | -- |
| IMAGE | IMAGE | 图像 |

## 怎么接

- **上游**：LoadImage / VAEDecode
- **下游**：VAEEncode / SaveImage / 下一个图像节点
- **接线**：接在 LoadImage 或 VAEDecode 之后，处理结果再交给 VAEEncode（重绘）、SaveImage（出图）或下一个图像节点；这类节点可以任意串联成处理流水线。

## 使用案例

属于「图像处理」类节点，向下游提供图像数据。从 `image1`、`direction`（right）、`match_image_size`（True） 开始填就能跑起来。典型接法：`LoadImage` → 本节点 → `VAEEncode`。输出类型是 IMAGE，只能接同类型的输入端口，颜色对不上就是接错了。

## 端口与连线示意

![ImageStitch 端口与连线示意](/svg/ImageStitch.svg)

## 同类节点

[裁剪图像](/nodes/05/ImageCrop.md) · [按遮罩裁剪图像](/nodes/05/ImageCropToMask.md) · [图像翻转](/nodes/05/ImageFlip.md) · [外补画板](/nodes/05/ImagePadForOutpaint.md) · [图像旋转](/nodes/05/ImageRotate.md) · [裁剪图像（中心）](/nodes/05/CenterCropImages.md) · [CropByBBoxes](/nodes/05/CropByBBoxes.md) · [图像裁剪](/nodes/05/ImageCropV2.md) · [裁剪图像（随机）](/nodes/05/RandomCropImages.md) · [调整尺寸并填充图像](/nodes/05/ResizeAndPadImage.md) · [调整图像/掩码大小](/nodes/05/ResizeImageMaskNode.md) · [缩放图像（长边）](/nodes/05/ResizeImagesByLongerEdge.md)
