π Bitmap Resize
Resize a bitmap by multiplier or exact pixels β and mind the shrink-only multiplier
- BITMAP
- BITMAP
Sooner or later the bitmap you generated is the wrong size. Dream Painter renders shapes at a resolution you chose, then you crop, rotate, or realize your ControlNet wants a different canvas. Bitmap Resize is the node that fixes that, in either of two flavors: scale by a multiplier (fraction of the current size) or set an exact pixel target.
It's the workhorse of the bitmap-processing shelf. You'll see it everywhere in DPaint workflows because the pack's nodes happily produce bitmaps at whatever resolution you last rendered, and downstream tools rarely want that exact number. If you're building a reusable workflow, a Resize after your render step is how you make the graph tolerant of input changes.
How it works
Two independent ways to set each axis, and they're alternatives, not multipliers:
- width_multiplier / height_multiplier - fractions of the current size, from 0.05 up to 1.0. Note the cap: the multiplier path can only shrink. There's no 2.0 in there.
- width_pixels / height_pixels - exact target in pixels, minimum 4.
If a pixel value is supplied it wins for that axis; otherwise the multiplier applies (defaulting to 1.0 = unchanged). The bitmap is resampled with PIL's default resize, staying one-bit - so the result can look slightly crunchy if you scale way down, which is normal for mode-"1" images.
Inputs and outputs
Inputs (BITMAP plus four sizing widgets):
- BITMAP
- width_multiplier, width_pixels, height_multiplier, height_pixels
Output:
- BITMAP - the resized bitmap.
Installing
From the Dream Painter pack (comfyui-dream-painter, 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.
Common issues
The trap that catches everyone: you set a multiplier to 2 to double the bitmap and nothing grows. That's not a bug - the multiplier's max is 1.0 by design (the pack's renderer already lets you pick your pixel size upstream). To upscale, use the pixel inputs. Second gotcha: the minimum output is 4Γ4, and like Bitmap Crop Center, resize strips any sense of canvas position - a bitmap that was centered after cropping will sit top-left after being resized if the aspect ratio changed. And if you're comparing sizes before/after, Bitmap Dimensions is the read-only node that reports them as plain integers.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| BITMAP | BITMAP | β | |
| width_multiplieropt | FLOAT | 0.05β1 | β |
| width_pixelsopt | INT | β | |
| height_multiplieropt | FLOAT | 0.05β1 | β |
| height_pixelsopt | INT | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BITMAP | BITMAP | β |