ComfyUI Node

ImageTool

Resize, rotate, mirror and flip in one node

By chibiace·Created 3 years ago·Updated 9 months ago· 92
ImageTool
  • image
  • IMAGE
width1920
height1080
crop
rotate0
mirror
flip
bgcolor

ImageTool is the pack's general-purpose image transform node - resize, crop-or-fit, rotate, mirror, and flip, all in one place instead of stacking four or five separate nodes to do the same thing. Where Chibi's other resize node, ImageSimpleResize, is built around SD-native square-ish targets (its default is 512), ImageTool defaults to 1920×1080 - a clear hint it's aimed more at output/video-style formatting than at prepping a latent for generation.

How it works

You set a target width and height directly (no edge-relative sizing here, unlike ImageSimpleResize - this one wants both dimensions explicitly). crop decides what happens when the source image's aspect ratio doesn't match your target: on, it crops to fill the frame exactly; off, it fits the whole image inside the target and pads the leftover space with bgcolor (black or white) - the classic letterbox/pillarbox result. rotate spins the image by degrees (0–360), and mirror/flip are independent horizontal/vertical toggles you can combine freely.

The inputs and outputs that matter

  • image - required.
  • width / height - target dimensions, default 1920×1080, range 16–32768.
  • crop - crop-to-fill (true) vs. fit-and-pad (false).
  • rotate - degrees, 0 to 360.
  • mirror - horizontal flip toggle.
  • flip - vertical flip toggle.
  • bgcolor - black or white, only visible when crop is off and padding is needed.

One output: IMAGE, the transformed result. There's no mask, no latent, no metadata here - this node is purely about pixels going in and different pixels coming out.

How to install it

  • ComfyUI Manager: search "ComfyUI-Chibi-Nodes", install, restart.
  • Manual: cd ComfyUI/custom_nodes && git clone https://github.com/chibiace/ComfyUI-Chibi-Nodes/, restart.

No models, no extra dependencies - standard PIL-level image manipulation. It appears under Chibi-Nodes/Image in the menu after install. Keep the pack's own framing in mind generally: the README calls these "experimental nodes" and admits version 2 shipped "with more bugs." For straightforward geometric transforms like this, that mostly just means don't expect exotic options beyond what's listed - two background colors, not a full picker; degrees, not a free-rotate-and-recompose canvas.

Common issues

The biggest one is crop doing something you didn't expect on a mismatched aspect ratio. If you set a widescreen target like the 1920×1080 default and feed it a square image with crop on, you'll lose a meaningful chunk of the top and bottom (or sides) to fill the frame - if that's not what you want, turn crop off and accept the padding bars instead, or pick a target aspect ratio that actually matches your source.

The other trap is order-of-operations confusion when combining rotate with mirror/flip and a non-square target: rotating a non-square image changes its effective bounding box, and depending on how the node sequences the transform internally, a 90-degree rotation into a fixed 1920×1080 target can produce different results than you'd get rotating first and resizing separately by hand. If your rotated output looks unexpectedly cropped or stretched, try isolating each transform in its own ImageTool node (rotate in one, resize in the next) to see exactly which step is doing what you didn't expect.

CategoryChibi-Nodes/Image

Inputs (8)

NameTypeDefaultDescription
imageIMAGE
widthINT192016–32768
heightINT108016–32768
cropCOMBO2 options: false, true
rotateINT00–360
mirrorCOMBO2 options: false, true
flipCOMBO2 options: false, true
bgcolorCOMBO2 options: black, white

Outputs (1)

NameTypeDescription
IMAGEIMAGE