> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# ResizeImageMaskNode - ComfyUI Built-in Node Documentation

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

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/ResizeImageMaskNode/en.md)

The Resize Image/Mask node provides multiple methods to change the dimensions of an input image or mask. It can scale by a multiplier, set specific dimensions, match the size of another input, or adjust based on pixel count, using various interpolation methods for quality.

## Inputs

| Parameter      | Data Type     | Required | Range                                                                                                                                                                              | Description                                                                                                                                                             |
| -------------- | ------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `input`        | IMAGE or MASK | Yes      | N/A                                                                                                                                                                                | The image or mask to be resized.                                                                                                                                        |
| `resize_type`  | COMBO         | Yes      | `SCALE_BY`<br />`SCALE_DIMENSIONS`<br />`SCALE_LONGER_DIMENSION`<br />`SCALE_SHORTER_DIMENSION`<br />`SCALE_WIDTH`<br />`SCALE_HEIGHT`<br />`SCALE_TOTAL_PIXELS`<br />`MATCH_SIZE` | The method used to determine the new size. The required parameters change based on the selected type.                                                                   |
| `multiplier`   | FLOAT         | No       | 0.01 to 8.0                                                                                                                                                                        | The scaling factor. Required when `resize_type` is `SCALE_BY` (default: 1.00).                                                                                          |
| `width`        | INT           | No       | 0 to 8192                                                                                                                                                                          | The target width in pixels. Required when `resize_type` is `SCALE_DIMENSIONS` or `SCALE_WIDTH` (default: 512).                                                          |
| `height`       | INT           | No       | 0 to 8192                                                                                                                                                                          | The target height in pixels. Required when `resize_type` is `SCALE_DIMENSIONS` or `SCALE_HEIGHT` (default: 512).                                                        |
| `crop`         | COMBO         | No       | `"disabled"`<br />`"center"`                                                                                                                                                       | The cropping method to apply when dimensions don't match the aspect ratio. Only available when `resize_type` is `SCALE_DIMENSIONS` or `MATCH_SIZE` (default: "center"). |
| `longer_size`  | INT           | No       | 0 to 8192                                                                                                                                                                          | The target size for the longer side of the image. Required when `resize_type` is `SCALE_LONGER_DIMENSION` (default: 512).                                               |
| `shorter_size` | INT           | No       | 0 to 8192                                                                                                                                                                          | The target size for the shorter side of the image. Required when `resize_type` is `SCALE_SHORTER_DIMENSION` (default: 512).                                             |
| `megapixels`   | FLOAT         | No       | 0.01 to 16.0                                                                                                                                                                       | The target total number of megapixels. Required when `resize_type` is `SCALE_TOTAL_PIXELS` (default: 1.0).                                                              |
| `match`        | IMAGE or MASK | No       | N/A                                                                                                                                                                                | An image or mask whose dimensions the input will be resized to match. Required when `resize_type` is `MATCH_SIZE`.                                                      |
| `scale_method` | COMBO         | Yes      | `"nearest-exact"`<br />`"bilinear"`<br />`"area"`<br />`"bicubic"`<br />`"lanczos"`                                                                                                | The interpolation algorithm used for scaling (default: "area").                                                                                                         |

**Note:** The `crop` parameter is only available and relevant when the `resize_type` is set to `SCALE_DIMENSIONS` or `MATCH_SIZE`. When using `SCALE_WIDTH` or `SCALE_HEIGHT`, the other dimension is automatically scaled to maintain the original aspect ratio.

## Outputs

| Output Name | Data Type     | Description                                                     |
| ----------- | ------------- | --------------------------------------------------------------- |
| `resized`   | IMAGE or MASK | The resized image or mask, matching the data type of the input. |
