Skip to main content
Mario248
Level 7
Nov 6, 2024 3:09 PM UTC

How to mask the image in AEM?

I am trying to convert an image to a masked image in AEM. For example, I have an image, and I want to apply a black-and-white mask, meaning the original image should be completely black. 

 

I know this can be done using the ImageMagick tool with the convert feature. Is there a way to accomplish this in Dynamic Media or using any AEM Assets API?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

11 replies

arunpatidar
Community Advisor
Community Advisor
Nov 6, 2024 4:57 PM UTC
Mario248
Mario248Author
Level 7
Nov 11, 2024 1:11 PM UTC

Customer is on-prem. Is firefly free ? any license required ?

Translate
Harwinder-singh
Community Advisor
Community Advisor
Nov 6, 2024 5:37 PM UTC

@mario248 You can create an image mask using any of the available tools like photoshop, ImageMagick etc. You can use dynamic media to apply these to images at scale.

https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/assets/dynamicmedia/dm-journey/dm-best-practices#effects-inside-the-source-image

 

Translate
Mario248
Mario248Author
Level 7
Nov 11, 2024 1:12 PM UTC

We want to do this AEM workflow. can you tell how do you use photoshop here? is there java api or library available ?

Translate
Harwinder-singh
Community Advisor
Community Advisor
Nov 22, 2024 6:56 PM UTC

@mario248 You can setup a custom worker on Adobe I/O that takes care of this. You can then invoke this from within an AEM workflow. 

Translate
anupampat
Community Advisor
Community Advisor
Nov 7, 2024 8:26 AM UTC

Hi @mario248 ,

 

Although your requirement is to completely back out the image but you can put watermark on AEM assets using com.day.cq.dam.commons.watermark Library. Putting it here in case its relevant for you.

 
Regards,
Anupam Patra
Translate
Mario248
Mario248Author
Level 7
Nov 11, 2024 1:10 PM UTC

can you tell me what watermark api should used ? any example you can provide ?

Translate
kautuk_sahni
Level 9
Nov 11, 2024 1:13 PM UTC

@mario248 Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Translate
Kautuk Sahni