Visit ComfyUI Online for ready-to-use ComfyUI environment
Resize image canvas to specified dimensions, add borders or crop as needed for uniform size in applications.
The ImageMagick Extent node is designed to resize the canvas of an image to specified dimensions, effectively adding borders or cropping the image as needed. This node is particularly useful for ensuring that your images fit within a specific size requirement without distorting the original content. By adjusting the width, height, and position (x, y) of the image, you can control how the image is framed within the new canvas size. This can be beneficial for creating uniform image sizes for galleries, thumbnails, or any application where consistent image dimensions are required.
This parameter represents the input image that you want to resize the canvas for. It is the primary image data that will be processed by the node.
This parameter sets the width of the new canvas. The image will be placed within this width, and any extra space will be filled according to the specified x position. The minimum value is 1, the maximum value is 1024, and the default value is 512.
This parameter sets the height of the new canvas. The image will be placed within this height, and any extra space will be filled according to the specified y position. The minimum value is 1, the maximum value is 1024, and the default value is 512.
This parameter determines the x-coordinate position of the image within the new canvas. It controls the horizontal placement of the image. The minimum value is 0, the maximum value is 1024, and the default value is 0.
This parameter determines the y-coordinate position of the image within the new canvas. It controls the vertical placement of the image. The minimum value is 0, the maximum value is 1024, and the default value is 0.
The output is the processed image with the new canvas size. The image will be resized according to the specified width, height, x, and y parameters, ensuring it fits within the new dimensions while maintaining its original content.
ValueError: Image dimensions out of bounds
TypeError: Invalid input type for image
RuntimeError: Failed to process image
© Copyright 2024 RunComfy. All Rights Reserved.