Expand my Community achievements bar.

Facing issues in node_modules in photoshop api

Avatar

Level 4

Hi,

 

I am integrating the photoshop firefly action in app builder. I have the photoshop action file that will do

  1. Convert Colour Profile – sRGB (layers)

  2. Deep Etch (Flattened Image) Single Layer Mask

  3. Clipping Path (post Deep Etch)

So i am calling applyPhotoshopActions (input, outputs, options) method which is from @adobe/aio-lib-photoshop-api file. From AEM using the post processing profile, i am calling the app builder worker with the photoshop action file, i am getting 2 renditions, one as psd and another one is png. I want to save the psd rendition applied with  above mentioned actions also with mask applied(editing/croping mask), then for png rendition i want to save as a transparent background. Example output image i need is below.

BhavaniBharani_0-1730457749498.png

 

 Hope i need to apply the transparent background and layered mask for the output which is generated from applyphotoshopactions method. But when i debug the code, i am not getting any logs or methods are getting executed after this applyphotoshopactions function. So i checked the node modules, i can see that some poll() method and setTimeout() method itself not working as expected. 

I checked the params i am passing to applyphotoshopaction -> which is having the options, input file, output filename. Also i can see the output in AEM( removed background image). Below is the params:

Options: {
actions: [
{
href: '0883e0c7-fcd1-47c9-9ec2-b73f9af3242e/photoshopActions.atn'
}
]
}
Source URL: https://sa0156990shared0f1db3b77.blob.core.windows.net/aem-blob-ns-team-aem-cm-prd-n11370-cm-p15699-...
2024-11-01T10:51:06.112Z

Temp Filename: 93f38b74-7402-4993-83c1-c1ccfe718450/rendition.jpg

 

Anyone knows how to solve this issue, please let me know..

 

Thanks in advance!

 

 

Regards,

Bhavani Bharanidharan

 

 

2 Replies

Avatar

Community Advisor

Hi @BhavaniBharani ,

 

Have you been able to resolve this issue?

Few pointers-

  • Make sure your Photoshop action file (photoshopActions.atn) includes the necessary steps for:
    • Layered Mask for the PSD.
    • Transparent Background for the PNG.
  • Ensure proper asynchronous handling in your code using async/await or Promises.
  • Add logging before and after the applyPhotoshopActions call to identify where the process may be failing.
  • Double-check the parameters sent to the App Builder worker, and ensure the worker is processing them correctly.

Thanks,

Ritesh Mittal

Avatar

Administrator

@BhavaniBharani Did you find the suggestion 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!



Kautuk Sahni