PSD File Format: Where exactly does Photoshop stores timeline data on a PSD file?

  • 2
  • Question
  • Updated 1 month ago

I just followed this simple tutorial: Create animated GIFs |

 

After saving it as PSD and opening again, I noticed that Photoshop persisted all timeline details (loop count, frame timings, etc).

But looking at the Adobe Photoshop File Formats Specification I could not find any details on where that data is stored.

 

I analyzed the file using a hex editor and noticed that Photoshop uses some ImageResource and some AditionalLayerInfo blocks that are not documented. Maybe that's where Photoshop stores the timeline data, but still I can't read it without any specs telling me how to do it.

 

Here are the ImageResource blocks:

 

Image resource ID: 0x0FA0 - 4000

Image resource Text: "maniIRFR    8BIMAnDs   ?              null        AFStlong        FrInVlLs    Objc          null        FrIDlongKI??    FrDllong       FrGAdoub@>      Objc          null        FrIDlongKI?O    FrDllong        FrGAdoub@>      Objc          null        FrIDlongKJ>?    FrDllong   5    FrGAdoub@>      Objc          null        FrIDlongKJ??    FrDllong   ?    FrGAdoub@>          FStsVlLs    Objc          null        FsIDlong        AFrmlong        FsFrVlLs    longKI??longKI?OlongKJ>?longKJ??    LCntlong    8BIMRoll             P ??5    ???5 "

                   

Image resource ID: 0x0FA1 - 4001

Image resource Text: "mfri                    "

 

Here is the AdditionalLayerInfo block:

 

Key: shmd (metadata)

          Data length: 26520

              Metadata:

                      Count: 2

                      Signature: 8BIM

                      Key: mlst

                      Copy: No

                      Length: 387

                      Text:               null        LaIDlong        LaStVlLs    Objc          null        enabbool     blendOptionsObjc          null        OpctUntF#Prc            FrLsVlLs    longKI??Objc          null        FrLsVlLs    longKI?OObjc          null        FrLsVlLs    longKJ>?Objc          null        enabbool     blendOptionsObjc          null        OpctUntF#Prc@Y          FrLsVlLs    longKJ?

 

                      Signature: 8BIM

                      Key: cust

                      Copy: No

                      Length: 26095

                      Text:            metadata         layerTimedoubA??Z2;?M layerXMPTEXT  2? < ? x p a c k e t  (XMP data goes in here, there's a lot of whitespace but I believe that is not important)


Question

So, I have no idea what each of these blocks are, so I wish to know it. Is there any document that explains to me what's supposed be that?


Photo of Nicke Manarin

Nicke Manarin

  • 4 Posts
  • 1 Reply Like
  • sad, because the file format specification is incomplete

Posted 1 month ago

  • 2
Photo of Warren Heaton

Warren Heaton

  • 168 Posts
  • 75 Reply Likes
Interesting question. Have you tried comparing it to other time based formats like an After Effects project or Premiere Pro project. You’d think you’d at least spot some time index information somewhere in the PSD.
Photo of Nicke Manarin

Nicke Manarin

  • 4 Posts
  • 1 Reply Like
Thanks for the reply. :)

I didn't, I only have Photoshop installed.

I tried changing the frame delay, saving with another name and comparing with the previous file.

I'm guessing that this info is stored near the inner block that starts with FrDl. But I'm not sure.

(Edited)
Photo of Kukurykus

Kukurykus

  • 664 Posts
  • 171 Reply Likes
Save the same .psd without TimeLine and then compare both files data to see differences.
Photo of Nicke Manarin

Nicke Manarin

  • 4 Posts
  • 1 Reply Like
Saving without the timeline results in this:

No image resource blocks:
0x0FA0 - 4000 and 0x0FA1 - 4001

Inside the shmd AdditionalLayerInfo there only this inner block:

                      Count: 1
                      Signature: 8BIM
                      Key: cust
                      Copy: No
                      Length: 51
                      Text:            metadata       layerTimedoubA????Z?

Photo of Kukurykus

Kukurykus

  • 664 Posts
  • 171 Reply Likes
You may also save some .psd before adding TimeLine to it to see whether that Additional Info will be in. If so, you'll know that doesn't belong to TimeLine, but probably only that you found earlier.
(Edited)
Photo of Nicke Manarin

Nicke Manarin

  • 4 Posts
  • 1 Reply Like
That's what I did. I created another PSD file from the original images, without adding the timeline.

Both ImageBlocks and the inner block mlst are not present. So these are the blocks that holds the timeline data