Visit ComfyUI Online for ready-to-use ComfyUI environment
Extract image dimensions accurately for processing and analysis, essential for precise image manipulation tasks.
The LayerUtility: GetImageSize node is designed to extract the dimensions of an image, providing you with the width and height in pixels. This node is particularly useful when you need to know the exact size of an image for further processing or analysis. By converting the image tensor to a PIL image, it ensures accurate measurement of the image dimensions. This node is essential for tasks that require precise image size information, such as resizing, cropping, or aligning images within a composition. Its straightforward functionality makes it a valuable tool for AI artists who need to manage and manipulate image layers effectively.
The image
parameter is the only required input for this node. It expects an image tensor, which is a multi-dimensional array representing the image data. The function processes this tensor to extract the image's width and height. The image tensor should be in a format compatible with PyTorch, and it is typically obtained from previous nodes or image processing steps. There are no specific minimum or maximum values for this parameter, but it must be a valid image tensor for the node to function correctly.
The width
output parameter provides the width of the image in pixels. This value is crucial for understanding the horizontal dimension of the image and is often used in further image processing tasks such as resizing or cropping.
The height
output parameter gives the height of the image in pixels. This value is essential for understanding the vertical dimension of the image and is used in various image manipulation tasks.
The original_size
output parameter is a tuple containing both the width and height of the image. This combined output is useful when you need to pass the image dimensions as a single entity to other nodes or functions that require both dimensions simultaneously.
original_size
output when you need to pass both dimensions together to streamline your workflow.© Copyright 2024 RunComfy. All Rights Reserved.