Nodes/ComfyLab Pack/Image: Downscale to Total Pixels (lab)
ComfyUI Node

Image: Downscale to Total Pixels (lab)

Downscale an image to match target size in megapuxels. If the image is smaller than the target size, it is kept as is. Note: image may be cropped, to prevent stretching and preserve aspect ratio.

By bugltd·Created 2 years ago·Updated about a year ago· 10
Image: Downscale to Total Pixels (lab)
  • image
  • image
  • width
  • height
  • actual_size
downscale_methodlanczos
megapixels1.0
multiple_of0
CategoryComfyLab/utils

Inputs (4)

NameTypeDefaultDescription
imageIMAGE
downscale_methodCOMBOlanczosdownscale method
megapixelsFLOAT1.00–16target size in megapixels
multiple_ofINT0if > 0, ensure the dimension are multiple of this number

Outputs (4)

NameTypeDescription
imageIMAGEdownscaled image
widthINTwidth
heightINTheight
actual_sizeFLOATactual size in MP