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

Thank you for this solution but I chose ActivePresenter for its ease of use :wink:

Feel free to play around with different features in ActivePresenter based on your specific needs! You can create masks for images using handy tools like Crop to Shape, or add a shape to cover the image with customizable transparency (adjust Opacity). If you share more details about the mask you’re aiming for, we may offer even more tailored suggestions!

Regards,