ComfyUI_essentials
时间:2025/09/02
🔧 Image Crop
用于从输入图像中裁剪出指定区域。你可以通过设定裁剪区域的位置 (x, y) 和大小 (width, height) 来提取图像的某一部分。对比comfyui原生节点,多了一个position功能,能够选择裁剪区域的锚点位置:
"top-left":左上角
"top-center":上中
"top-right":右上角
"right-center":右中
"bottom-right":右下角
"bottom-center":下中
"bottom-left":左下角
"left-center":左中
"center":中心
🔧 Image Crop-节点参数说明
| 输入参数 | |
| image | 必须参数,输入待裁剪的图像。 |
| 输出参数 | |
| IMAGE | 返回裁剪后的图像。 |
| x | 裁剪区域起始横坐标 |
| y | 裁剪区域起始纵坐标 |
| 控件参数 | |
| width | 裁剪区域的目标宽度。默认 256 |
| height | 裁剪区域的目标高度。默认 256 |
| position | 决定裁剪区域的锚点位置: "top-left":左上角 "top-center":上中 "top-right":右上角 "right-center":右中 "bottom-right":右下角 "bottom-center":下中 "bottom-left":左下角 "left-center":左中 "center":中心 |
| x_offset | 横坐标的偏移量(正数向右,负数向左)。默认 0。 |
| y_offset | 纵坐标的偏移量(正数向下,负数向上)。默认 0。 |

