Apply a mask as the alpha channel of the source image and crop to the mask's bbox, producing a transparent cutout (sprite primitive / CLIP-embed input).
Optional
pixels to expand the crop on each side (default 0)
'transparent' (default) keeps alpha; 'opaque' flattens to black
'transparent'
'opaque'
Apply a mask as the alpha channel of the source image and crop to the mask's bbox, producing a transparent cutout (sprite primitive / CLIP-embed input).