Create a mask on an image

Hello.
Is it possible to create a mask on an image?
Thanks.

Hi Christ,

Yes, it’s posible to create a mask on an image by using some JavaScript codes in ActivePresenter.
For example, you can add the following JavaScript codes to the On Load event of a slide:

const style = prez.object(“test-mask”).node.style;
const mask = “linear-gradient(rgba(0, 0, 0, 1), transparent)”;

if (“webkitMaskImage” in style) {
style.webkitMaskImage = mask;
} else {
style.maskImage = mask
}

Using the codes above, you need to rename the object you wish to create a mask on to “test-mask”.
For further details, please visit this link: mask-image - CSS: Cascading Style Sheets | MDN.

Best regards,
Hang