ag-psd icon indicating copy to clipboard operation
ag-psd copied to clipboard

smart object is not changing after making change on linkedFiles.

Open hihabib opened this issue 2 years ago • 8 comments

const newPSD = { ...oldPSD, linkedFiles: [ ...newLinkFile ], } const final = writePsdBuffer(newPSD , {generateThumbnail: true}); fs.writeFileSync('my-file.psd', final);

here smart object (linked psb) file is changing. but the change is not showing on the main "my-file.psd" file. May the cause is "my-file.psd" children has its own canvas and after changing the linked file canvas, "my-file.psd" children canvas is not updating. How can I update or generate the "my-file.psd" children canvas with the smart object canvas by ag-psd library?

hihabib avatar May 17 '22 08:05 hihabib

Photoshop will still use pre-generated bitmap stored in the layer, until you edit smart object in the PSD file. So if you want to update linked file, you also need to update layer canvas.

Agamnentzar avatar May 17 '22 13:05 Agamnentzar

Photoshop will still use pre-generated bitmap stored in the layer, until you edit smart object in the PSD file. So if you want to update linked file, you also need to update layer canvas.

How can I update the layer canvas with the ag-psd library without opening with photoshop. Because I have to convert the psd which is generated with ag-psd to png.

hihabib avatar May 17 '22 13:05 hihabib

That's not possible, ag-psd only gives you a way to read file data, it doesn't replicate entire photoshop renderer, and can't generate new bitmap data based on layer information, sorry.

Agamnentzar avatar May 17 '22 13:05 Agamnentzar

is it possible to do the stuff with another library? with php, nodejs or python?

hihabib avatar May 17 '22 13:05 hihabib

It might be, I don't know any library that does that.

Agamnentzar avatar May 17 '22 13:05 Agamnentzar

Okay thank you for your time 😊

hihabib avatar May 17 '22 13:05 hihabib

If anyone knows how to do it, please tell me that.

hihabib avatar May 17 '22 13:05 hihabib

If anyone knows how to do it, please tell me that.

Look here: https://github.com/Agamnentzar/ag-psd/issues/147

jaankoppe avatar Aug 03 '23 17:08 jaankoppe