8 Commits

Author SHA1 Message Date
Denys Smirnov
ed0c0d1c26 Allow joining a batch of images with a single mask
Previously, JoinImageWithAlpha required a batch of images to match a batch of masks. But for some use cases it's easier to provide a batch of images and a single mask.

This change automatically repeats the mask for all images in a batch.

In the same spirit, PorterDuffImageComposite will now allow a single mask for a batch of images (for both src and dst).

But also, PorterDuffImageComposite will apply the same logic to src and dst: if src contains one image, and dst is a batch it will repeat src to match dst (or the opposite).
2024-05-06 12:33:16 +03:00
comfyanonymous
c16f5744e3 Fix SplitImageWithAlpha and JoinImageWithAlpha. 2023-10-08 15:52:10 -04:00
comfyanonymous
0e763e880f JoinImageWithAlpha now works with any mask shape. 2023-10-04 15:54:34 -04:00
comfyanonymous
9212bea87c Change a few things in #1578. 2023-10-04 15:43:41 -04:00
MoonRide303
214ca7197e Corrected joining images with alpha (for RGBA input), and checking scaling conditions 2023-10-04 19:04:52 +02:00
MoonRide303
585fb0475b Adding default alpha when splitting RGB images 2023-10-04 19:04:52 +02:00
MoonRide303
ece69bf28c Change channel type to MASK (reduced redundancy, increased usability) 2023-10-04 19:04:52 +02:00
MoonRide303
d06cd2805d Added support for Porter-Duff image compositing 2023-10-04 19:04:48 +02:00