The structure of the psd file is summarized in this document, but there is no information on animation. This is because animation is realized as a plug-in. Therefore, here is a summary of what we found by examining the actual exported psd files.
From the top, there are group "group" and layer "bg", and the group has layers "fg1", "fg2", "fg3", and "fg4"
Frame animation arranged in the order of fg4, fg3, fg2, fg1.
The section seems to have an information about animation. There's a byte sequence like:
38 42 49 4D 0F A0 00 00 00 00 02 04 6D 61 6E 69 49 52 46 52 00 00 01 C4 38 42 49 4D 41 6E 44 73 00 00 01 A4 00 00 00 10 00 00 00 01 00 00 00 00 .. 38 42 49 4D 52 6F 6C 6C 00 00 00 08 00 00 00 00 00 00 00 00 06 C0 00 00 30 F3 63 46 D8 01 00 00 70 D9 63 46 D8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0B 00 00 0B 13 C0 00 00
This section can be decoded as following (* indicates that the field is not in the document, i.e., it was guessed.):
Value | Meaning |
---|---|
38 42 49 4D ("8BIM" ) |
Signature for each resource |
0F A0 | Image resource id, which means plug-in resources |
00 00 ("" ) |
Resource name in pascal string; the name is empty |
00 00 02 04 (0d516 ) |
The length of data following |
6D 61 6E 69 ("mani" ) |
*Unknown; field name? (m... animation) |
49 52 46 52 ("lRFR" ) |
*Field name (layer reference?) |
00 00 01 C4 (0d452 ) |
*Unknown; Offset for next field? |
38 42 49 4D ("8BIM" ) |
*Signature |
41 6E 44 73 ("AnDs" ) |
*Field name (Animation Descriptor) |
00 00 01 A4 (0d420 ) |
*The length of field following |
00 00 00 10 (0d16 ) |
*The version |
00 00 00 00 ... | *Descriptor (most of the information is in here) |
38 42 49 4D ("8BIM" ) |
*Signature |
52 6F 6C 6C ("Roll" ) |
*Unknown; field name? |
Following Data | *Unknown; no information? |
The descriptor is considered to contain information for each frame. I made a decoder that outputs the descriptor to JSON (the descriptor structure is documented here). Using the decoder, the descriptor should be following:
- (Descriptor)
(no name).null
#3AFSt
: long (animation frame status?)- value:
0
- value:
FrIn
: VlLS (frame information?) #n (repeated for each frame)- (Descriptor)
(no name).null
#2FrID
: long (frame identifier?)FrGA
: double (frame global angle?; 90: no rotation)
- (Descriptor)
FSts
: VlLs (frame status?) #1- 0: (Descriptor)
(no name).null
#4 FsId
: long (f...s... identifier?)- value: 0
AFrm
: long (animation frame?)- value: 1
FsFr
: VlLs #n (f...s... frame?; repeated for each frame)- 0: long (one of
FrID
above)
- 0: long (one of
LCnt
: long (layer count?)- value: 0
- 0: (Descriptor)
Layer and Mask Information Section contains information on each layer. Each layer can have enumerated information called Additional Layer Information. One of the fields with the key mlst
appears to be related to animation. The mlst
also has a structure of version followed by descriptor. The decoded descriptor is in this file.
- (Descriptor)
(no name).null
#2LaID
: long (layer identifier)- value: unique ID for each frame?
LaSt
: VlLs #n (layer status?; repeated for each frame)- (Descriptor)
(no name).null
#n (variable)enab
: bool (enabled?; seems to be switching state of visibility)FrLs
: VlLs #n (frame list?; variable?)- long: frame ID above
Lefx
: Descriptor(no name).null
#12?- seems to contain layer effect information
- (Descriptor)