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

# ImageScaleToTotalPixels - ComfyUI Built-in Node Documentation

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

The ImageScaleToTotalPixels node is designed for resizing images to a specified total number of pixels while maintaining the aspect ratio. It provides various methods for upscaling the image to achieve the desired pixel count.

## Inputs

| Parameter        | Description                                                                                                   | Data Type      |
| ---------------- | ------------------------------------------------------------------------------------------------------------- | -------------- |
| `image`          | The input image to be upscaled to the specified total number of pixels.                                       | `IMAGE`        |
| `upscale_method` | The method used for upscaling the image. It affects the quality and characteristics of the upscaled image.    | COMBO\[STRING] |
| `megapixels`     | The target size of the image in megapixels. This determines the total number of pixels in the upscaled image. | `FLOAT`        |

## Outputs

| Parameter | Description                                                                                          | Data Type |
| --------- | ---------------------------------------------------------------------------------------------------- | --------- |
| `image`   | The upscaled image with the specified total number of pixels, maintaining the original aspect ratio. | `IMAGE`   |

> 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/ImageScaleToTotalPixels/en.md)
