-
Couldn't load subscription status.
- Fork 2.7k
fix(nodes) paste_image paste mask transparency and img_scale add multiple of #8437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
fix(nodes): paste_image, paste mask operation doesn't want a black backdrop, black should translate to transparent, the hack here is to used the reference image instead, thus, acting as transparent but it's not. + img_scale, add "multiple of" for convenience
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! It looks like this changes the existing node behaviours a bit and therefore is not backwards compatible. Can you please review and ensure the nodes are backwards compatible when the new fields are not set by the user?
|
|
||
| # Create a temporary image to paste the image with transparency | ||
| temp_image = Image.new("RGBA", new_image.size) | ||
| temp_image = new_image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems off. We are assigning new_image to temp_image. They now both refer to the same object. Then we paste image onto temp_image. Finally, we do an alpha composite of new_image and temp_image - so alpha compositing the same image onto itself?
I think I understand the root issue you want to address, but if you can provide some example input images to test with, I'd be better able to review. Ty


Summary
fix(nodes): paste_image, paste mask operation doesn't want a black backdrop. Black should translate to transparent and the hack here is to used the reference image instead. Thus, acting as transparent but it's technically not. + img_scale, add "multiple of" for convenience
Related Issues / Discussions
QA Instructions
Merge Plan
Checklist
What's Newcopy (if doing a release after this PR)