Supplying a mask for each image

Greetings.

 

Yes, it is possible. The alpha channel of input images, if present, is used for masking. Full alpha mask (255 for 8bit alpha channel) shall mean ‘use’.

 

Another trick to ‘mask out’ the background, albeit probably slower, is to clear the background with a solid colour, e.g. white.