π Bitmap Dimensions
The read-only node that tells you how big a bitmap is
- BITMAP
- width
- height
Bitmap Dimensions is the boring node you'll be glad exists. It does one thing: takes a bitmap, hands back its width and height as plain integers. No transformation, no math, no surprises. In a Dream Painter graph it's the "what am I actually working with here?" check, and it's quietly useful whenever the rest of your workflow wants numbers.
Dream Painter's bitmaps are one-bit images - pure black and white, no grayscale - and they don't carry any size information you can read off the wire. This node is the way to get that out into the graph so other nodes can act on it.
Why you'd actually reach for it
The bitmap pipeline has a habit of resizing on you. Resize, crop, and rotate all change dimensions, and Bitmap Rotate defaults its center to 256,256 regardless of your actual canvas - which means you often need the real size to set that center correctly. Dimensions gives you the current width and height to feed back in.
It also plays nicely with the "introspection" side of ComfyUI that the ecosystem doc calls out: knowing your input size lets you compute a target resolution, check that a crop didn't shrink something below a threshold, or just debug a workflow where the controlnet guide "suddenly looks smaller than expected." Wire the two INT outputs into a math node or an Any/reroute and you have the start of resolution math that doesn't require you to hardcode anything.
Inputs and outputs
- BITMAP - the bitmap to measure.
Outputs:
- width (INT)
- height (INT)
That's the whole node. It's not an output node, so you can feed these numbers anywhere a widget would do.
Installing
Part of the Dream Painter pack (comfyui-dream-painter, by alt-key-project). ComfyUI Manager β Install Custom Nodes β search Dream Painter β install β restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/alt-key-project/comfyui-dream-painter
cd comfyui-dream-painter
pip install -r requirements.txt
No models, no downloads, no GPU work - the whole pack is PIL arithmetic.
Common issues
There's not much to break here. One subtlety: the width/height it reports are the bitmap's current size, which for a 1-bit image is just the pixel dimensions - there's no DPI or aspect metadata to get confused about. And since bitmaps are forced to a minimum of 4Γ4 pixels by the pack, you'll never read back a zero. If you're reading the same number twice, you're probably measuring before a crop node rather than after - check your wiring order.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| BITMAP | BITMAP | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| width | INT | β |
| height | INT | β |