> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-docs-recommend-assets-api.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ResizeImagesByLongerEdge - ComfyUI Built-in Node Documentation

> Complete documentation for the ResizeImagesByLongerEdge node in ComfyUI. Learn its inputs, outputs, parameters and usage.

> 本文档由 AI 生成。如果您发现任何错误或有改进建议，欢迎贡献！ [在 GitHub 上编辑](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/ResizeImagesByLongerEdge/zh.md)

## 概述

Resize Images by Longer Edge 节点通过调整图像尺寸，使其最长边与指定的目标长度匹配。该节点会自动判断图像的宽度或高度哪一边更长，并按比例缩放另一维度以保持原始宽高比。此功能适用于基于图像最大维度进行尺寸标准化的场景。

## 输入

| 参数            | 数据类型  | 必填 | 取值范围     | 描述                            |
| ------------- | ----- | -- | -------- | ----------------------------- |
| `image`       | IMAGE | 是  | -        | 需要调整尺寸的输入图像或图像批次。             |
| `longer_edge` | INT   | 否  | 1 - 8192 | 最长边的目标长度。较短边将按比例缩放。（默认值：1024） |

## 输出

| 输出名称    | 数据类型  | 描述                                                           |
| ------- | ----- | ------------------------------------------------------------ |
| `image` | IMAGE | 调整尺寸后的图像或图像批次。输出的图像数量与输入相同，每张图像的最长边均与指定的 `longer_edge` 长度匹配。 |
