Facing issues in node_modules in photoshop api | Community
Skip to main content
Level 4
November 1, 2024
Question

Facing issues in node_modules in photoshop api

  • November 1, 2024
  • 2 replies
  • 514 views

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 @61380/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.

 

 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-e36869/4db4-aefb-9bc1-49e2-b674-290deb370b8f-1730458240438?sig=eKje9lqWqvzXVT3UoyyQHQ2SAWum4Ufj1iDxckx86QQ%3D&se=2024-11-01T22%3A50%3A45Z&sv=2019-02-02&rscc=private%2C%20max-age%3D43200%2C%20immutable&rsct=image%2Fjpeg&sp=r&sr=b
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

 

 

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

2 replies

Ritesh_Mittal
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
November 19, 2024

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

kautuk_sahni
Community Manager
Community Manager
November 26, 2024

@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