Image Scale Megapixel

XJImageScaleMegapixel

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)

Pack: ComfyUI-XJNodes

custom_nodes.ComfyUI-XJNodes

Inputs (5)

NameTypeRequired
imageIMAGErequired
megapixelsFLOATrequired
round_toCOMBOrequired
methodCOMBOrequired
upscale_modeCOMBOrequired

Outputs (3)

NameType
imageIMAGE
widthINT
heightINT