Skip to main content
Adobe Photoshop Family

5 Messages

 • 

160 Points

Thu, Oct 17, 2019 3:35 PM

Photoshop: Parsing smart object following PSD File Format

I am doing the job that parsing the PSD files on web, and I read all the data by following https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/. Now I am given a task to get the original image source of a smart object when there is an image placed into the PSD.

I have already parsed 'Placed Layer' and 'Linked Layer' and just gotten the size, name and some other information of the original image. But I didn't find the image data to render the complete image.

I will be appreciate if anyone can give me some suggestions.
Here are the datas I have already read:

Responses

Champion

 • 

623 Messages

 • 

14.6K Points

a year ago

The smart object is literally a separate file that you have to open and parse. For linked, that's another file on disk... for embedded, it is kind of like it's zipped into the psd. I've been able to access it with javascript actionmanager code

(incomplete code here)
...var desc = new ActionDescriptor();
        executeAction(s2id('placedLayerEditContents'), desc, DialogModes.NO);
Hope that helps you get on the right track...

5 Messages

 • 

160 Points

a year ago

I found a package which parsing with python code and got what I just want. The official document ignores the key data.

Anyway, thanks for your help. It's very nice of you.

Champion

 • 

623 Messages

 • 

14.6K Points

Thanks for the follow up. Can you share the link to the code you found?

5 Messages

 • 

160 Points

Sorry, I learned from this library https://github.com/psd-tools/psd-tools