ImagePad KJ

节点功能:在图像周围添加填充,可以指定上、下、左、右四个方向的填充量,并支持不同的填充模式。(该节点适合在扩图工作流中使用)ImagePad
节点中英文对比
ImagePad KJ
  • image
  • 遮罩
  • target_width
  • target_height
  • images
  • masks
  • left
    right
    top
    bottom
    extra_padding
    pad_mode
    color
    ImagePad KJ
  • image
  • mask
  • target_width
  • target_height
  • images
  • masks
  • left
    right
    top
    bottom
    extra_padding
    pad_mode
    color
    ImagePad KJ - 参数说明
    输入参数
    image
    需要进行边缘扩展的输入图像。
    mask
    可选掩码,与图像一同进行填充操作。若指定,将同步填充掩码;否则自动生成新掩码。
    target_width
    目标宽度,强制输出为指定宽度。
    target_height
    目标高度,强制输出为指定高度。
    输出参数
    images
    边缘填充后的图像,大小为原图 + 指定 padding。
    masks
    与图像对应的掩码,填充部分为 1,原始区域为 0。
    控件参数
    left
    向左填充的像素数。
    right
    向右填充的像素数。
    top
    向上填充的像素数。
    bottom
    向下填充的像素数。
    extra_padding
    在左右上下各方向额外填充的像素数。
    pad_mode
    填充模式,可选 edge(边缘延展)或 color(指定颜色)edge 适用于平滑衔接;color 适用于显式背景色扩展。
    color
    填充颜色,格式为 "R, G, B",数值范围 0-255。仅在 pad_mode=color 时生效。推荐使用 "0, 0, 0"(黑)或 "255, 255, 255"(白)。
    暂无节点说明
    节点列表 首页