Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Exporting Timeline Frames #81

Open
hasyimibhar opened this issue Mar 30, 2015 · 4 comments
Open

Support for Exporting Timeline Frames #81

hasyimibhar opened this issue Mar 30, 2015 · 4 comments

Comments

@hasyimibhar
Copy link

It would be nice if there is support for exporting the timeline frames as images. Something like this:

psd.tree.filter_by_animframe(0).save_as_png("frame01.png")

As a game developer, this would be tremendously helpful for me, as I could simply use .psd files as source files for my engine-ready assets. Currently, in order to achieve the following, I would have to "convert" the animation frames into layer comps in Photoshop, and then use filter_by_comp.

@meltingice
Copy link
Member

That is a pretty cool idea. I have no idea where or how that data is stored, so it will take some serious sleuthing to find out. Could be really difficult, but could also be way easier than expected.

@meltingice
Copy link
Member

Do you have an example PSD by any chance so I can poke around? I've never worked with the timeline before in Photoshop.

@hasyimibhar
Copy link
Author

I did some search, and I found out that the timeline frames information is stored inside a chunk marked with "AnDs". Somewhere inside that descriptor, there is a list ("FrIn") which contains a descriptor containing the ID of each frame ("FrID") and its delay in centiseconds ("FrDl"). If you search for the frame ID, you'll see that it appears again somewhere below inside a list ("FsFr").

Inside a PSD with 2 frames and 2 layers, where each frame has a single layer visible, it seems that each frame ID appears again (somewhere below) for each layer ("LaID"), inside a descriptor ("LaSt") which seems to contain a list of booleans of whether that layer is visible for each frame ID.

Sample PSD file with 1 frame and 1 layer

Sample PSD file with 2 frames and 2 layers

I'm guessing that more data will appear inside "LaSt" (which I think means Layer State) if the layer is moved/rotated/scaled between frames.

Hope that helps. :)

@NickeManarin
Copy link

NickeManarin commented Sep 29, 2018

Hi @hasyimibhar
Did you find any more details about this?

Specially how the ImageResource block 0x0FA0 - 4000 and the blocks (mlst and cust) inside the AdditionalLayerInfo called shmd (metadata) can be interpreted.

https://forums.adobe.com/message/10646902

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants