Nodes/opencv-comfyui/OpenCV resizeWindow_1
ComfyUI Node

OpenCV resizeWindow_1

ResizeWindow_1 — the other phantom-window resizer

By geroldmeisinger·Created about a year ago·Updated about a year ago· 35
OpenCV resizeWindow_1
    • unknown
    winname
    size

    resizeWindow_1 is the second overload of OpenCV's cv2.resizeWindow - and, rare for this pack, it isn't a byte-for-byte duplicate of its _0 sibling. The difference: resizeWindow_0 takes winname, width, and height as separate ints, while resizeWindow_1 takes winname plus a single size literal - a (width, height) tuple typed as a string, like (800, 600).

    That's the interesting part, and also the only interesting part. Because underneath, this is still a HighGUI desktop-window function: it resizes a window created by namedWindow/imshow on an actual display. ComfyUI is a node server with a browser front end. There is no native OpenCV window to resize, so this node - like resizeWindow_0 - does nothing useful in a normal ComfyUI setup. And the output tells you everything: a single None-typed output named unknown. Nothing to wire, nothing to consume.

    It's a product of opencv-comfyui's (geroldmeisinger/opencv-comfyui) "wrap every standalone OpenCV function" generator, which the author himself flags as producing nodes that "don't make sense in ComfyUI" - the todo list even proposes blacklisting None-returning functions like this one. The size literal here is parsed with ast.literal_eval, so if you did ever call it, (800, 600) parses and 800, 600 throws the pack's signature invalid syntax error. (That's the one piece of genuinely transferable knowledge on this page.)

    Installing it

    Same pack, same install: ComfyUI Manager (search "opencv-comfyui"), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/geroldmeisinger/opencv-comfyui
    

    restart, confirm OpenCV:

    pip install opencv-contrib-python
    

    The verdict

    Skip it. If you want to view or preview images, ComfyUI's own Preview Image is the tool. If you want to resize actual images, this pack's resize_0 is the one worth your time - it resizes pixels, not windows. resizeWindow_1 is a museum piece: educational about how the generator works, useless in practice.

    Categoryimage/OpenCV

    Inputs (2)

    NameTypeDefaultDescription
    winnameSTRING
    sizeSTRING

    Outputs (1)

    NameTypeDescription
    unknownNone