π’ CreateCornerFrame
The viewfinder corner brackets that say 'scan me'
- image
- IMAGE
The "scan this" frame
CreateCornerFrame adds a margin around your image and draws a bracket in each corner - the four little L-shaped marks that look like a camera viewfinder or an AR scan frame. It's the same visual language QR codes themselves use (those three square finder patterns in the corners), so it instantly reads as "point your phone at this." Put it around a QR on a poster or product shot and people will scan it without being told to. In a pack full of QR generators, this is the node that makes the QR feel scannable even before it is.
How it works
The node pads the image by frame_size pixels and fills that margin with bg_color, then draws eight short fg_color line segments - one horizontal and one vertical bracket at each of the four corners. The bracket length is derived from a quarter of the canvas, and thickness sets the line weight. Same input set as its solid sibling: image, fg_color, bg_color (tuple strings like "(0, 0, 0)"), thickness, frame_size. One IMAGE output.
The corner brackets are drawn on the outer margin, so unlike a solid frame, the image doesn't get visually boxed in - it floats inside the brackets with open sides, which is exactly the airy "scan zone" look. That also means frame_size does double duty: too small and the brackets crowd the image; too big and the image shrinks relative to the whole canvas.
The QR-specific advice
For a QR card, keep the bracket fg_color dark on a light bg_color - the brackets should complement the code, not compete with its finder patterns. And while we're here, the corners are where QR readers look first, so don't let your brackets visually merge with the code's own finder squares; a clear bg_color gap between image edge and bracket keeps them distinct.
Common issues
- Brackets invisible β
fg_colorandbg_colormatch. They need contrast. - Brackets look off-center or clipped β the geometry is computed from canvas quarters; if the image has odd dimensions, eyeball the result before printing.
- Colors come out gray β color string wasn't in
"(r, g, b)"format; the node silently falls back to gray rather than erroring.
Installing it
Part of ComfyUI-Simple_QR_Codes: ComfyUI Manager β search "Simple QR Codes" β install β restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/zentrocdot/ComfyUI-Simple_QR_Codes
cd ComfyUI-Simple_QR_Codes
pip install -r requirements.txt
Needs opencv-python (already a pack dependency). No model files. It lives under QR Code Nodes β frames after restart.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | β | |
| fg_color | STRING | (255, 255, 255) | β |
| bg_color | STRING | (0, 0, 0) | β |
| thickness | INT | 41β8192 | β |
| frame_size | INT | 402β8192 | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |