Nodes/ComfyUI-XJNodes/Image Scale Megapixel
ComfyUI Node

Image Scale Megapixel

Scale image to target megapixels. - fill: Scale to exactly reach target (may change aspect ratio) - fit: Scale to fit within target (maintains aspect ratio) - crop: Scale to cover target and crop (maintains aspect ratio)

By alexjx·Created 9 months ago·Updated 3 months ago· 0
Image Scale Megapixel
  • image
  • image
  • width
  • height
megapixels1.00
round_to8
methodfit
upscale_modelanczos
CategoryXJNodes/image

Inputs (5)

NameTypeDefaultDescription
imageIMAGE
megapixelsFLOAT1.000.01–16
round_toCOMBO85 options: 8, 16, 32, 64, 128
methodCOMBOfit3 options: fill, fit, crop
upscale_modeCOMBOlanczos5 options: lanczos, bicubic, bilinear, nearest-exact, area

Outputs (3)

NameTypeDescription
imageIMAGE
widthINT
heightINT