CropToCenter
A custom node for ComfyUI that crops images to specified dimensions from a center point with optional offset, removing equal amounts from all sides. There are two ways to install this custom node: 1. Install ComfyUI Manager if you don't have it yet. 2. Go to Manager > Install Custom Nodes. 3. Search for Crop To Center and click Install. 4. Restart ComfyUI. 1. Navigate to your ComfyUI/customnodes/ directory. 2. Clone the repository: git clone https://github.com/leewinder/comfyui-crop-to-center.git. 3. Restart ComfyUI. The Crop To Center node takes an input image and crops it to specified dimensions from the center of the image, with the option to offset the center point to move the crop region around the image. It removes equal amounts from all sides around the center point, while staying true to the request image dimensions. The center offset can move to the edges of the image, but the crop process will prioritise the image dimensions requested, while staying as close to the center point as possible, ensuring your image is always the correct size. - image: Input image to be cropped - targetwidth: Target width for the cropped image (must be less than or equal to source width) - targetheight: Target height for the cropped image (must be less than or equal to source height) - centeroffsetx: Horizontal offset from the true center (positive = right, negative = left) - centeroffsety: Vertical offset from the true center (positive = up, negative = down) - croppedimage: The cropped image with the specified dimensions Contributions are welcome! Please feel free…
Image/Transform · 1 entrada · 4 parámetros · 1 salida