Skip to content

ImageResizeKJv2 dead code and dubious conditionals #405

Description

@set-soft

In this node you have

if width == 0:
width = W
if height == 0:
height = H

Which seems to be in conflict with:

if keep_proportion == "resize" or keep_proportion.startswith("pad") or pillarbox_blur:
# If one of the dimensions is zero, calculate it to maintain the aspect ratio
if width == 0 and height != 0:

How can width be 0 if it was assigned the image width?

I think the original intention was:

if width == 0 and height == 0:
    width, height = W, H

BTW: why did you remove the get_image_size input from the previous version, I think this is handy

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions