Visit ComfyUI Online for ready-to-use ComfyUI environment
Calculate image aspect ratio in integer and floating-point formats, simplifying proportions for AI artists.
The easy imageRatio
node is designed to calculate and provide the aspect ratio of an image in both integer and floating-point formats. This node is particularly useful for AI artists who need to understand the proportions of their images for various artistic and technical purposes. By determining the greatest common factor (GCF) of the image's width and height, the node simplifies the aspect ratio to its most basic form, making it easier to work with. This can be especially beneficial when resizing images, ensuring that the proportions are maintained, or when preparing images for different formats and displays. The node's ability to return both integer and floating-point ratios provides flexibility depending on the precision required for your project.
The image
parameter is the only required input for this node. It represents the image whose aspect ratio you want to calculate. The image should be provided in a format that the node can process, typically as an array or tensor with dimensions corresponding to the image's height, width, and color channels. This parameter is crucial as it directly influences the calculation of the aspect ratio. There are no specific minimum, maximum, or default values for this parameter, as it entirely depends on the image you provide.
The width_ratio_int
output parameter represents the width component of the image's aspect ratio in its simplest integer form. This value is derived by dividing the image's width by the greatest common factor of the width and height.
The height_ratio_int
output parameter represents the height component of the image's aspect ratio in its simplest integer form. This value is derived by dividing the image's height by the greatest common factor of the width and height.
The width_ratio_float
output parameter represents the width component of the image's aspect ratio in floating-point form. This value is the same as width_ratio_int
but expressed as a float for applications requiring decimal precision.
The height_ratio_float
output parameter represents the height component of the image's aspect ratio in floating-point form. This value is the same as height_ratio_int
but expressed as a float for applications requiring decimal precision.
easy imageRatio
node to quickly determine the aspect ratio of your images before resizing them to ensure that the proportions are maintained.width_ratio_int
and height_ratio_int
) are particularly useful for understanding the basic proportions of your image, while the floating-point outputs (width_ratio_float
and height_ratio_float
) can be used for more precise calculations.image
parameter is not provided or is None
.© Copyright 2024 RunComfy. All Rights Reserved.