Open henriquecolini opened 1 year ago
Hey!
I'd be happy to review a PR that implements this. I'd also be more than happy to answer any questions.
I'm interested in looking into this. If anyone has some test psd files using a range of timeline features I'd appreciate a couple.
Descriptor
format is involved somehow, it is described in this doc, and already implemented by this lib.So far I have found two Image Resource blocks given IDs in the 4000-4999 range, They both have 4byte tags on the front, so I am not sure if their rid is consistent, or if that's more of an index in the document.
mani
tagged "plug-in" image resource block (id 4000
)This it quite an ad-hoc investigation
mani
IRFR
[0, 0, 2, 24]
- possibly a byte length of some kind, it's in the right magnitude...8BIM
AnDs
16
- presumably this is the descriptor format version we see around a lot1
0
"\0\0null"
(maybe this null
is actually an OSType we don't know of yet with 0-data-length?)DescriptorStructure::read_fields
works from this cursor point)
AFSt
, integer 0
FrIn
, list of unnamed structsFrID
, random-seeming integer, I guess the Frame ID
FrGA
, double, 90.0
for me so farFrDl
, integer, I think this the frame "delay" in centi-seconds, field omitted entirely unless you select a delayFSts
, list of structs, 1 long for me so farLCnt
, integer, 1 for me so farFsFr
, list of the frame IDs from FrIn.FrID
AFrm
, integer, seems to be the same as the selected frame index in mfri
FsID
, integer, always 0 for me so far8BIM
Roll
100
and a multiple of 4
, not tried to understand it yetmfri
tagged "plug-in" image resource block (id 4001
)mfri
2
16
1
shmd
According to the forum post this is relevant to animation, Looks like similar formats to the stuff in mani
. There are three sub-sections
mlst
- this looks like a Descriptor padded similarly to the one in mani
mdyn
- this seems to be 4 bytes... not sure what it iscust
- simliar header to mlst
but doesn't look like a DescriptorThere appear to be three sub sections within
The current version of this crate does not support Timeline data, which would make it a valuable tool for animation. It would allow for batch exporting of animation frames, saving time and effort for games with a lot of frame-by-frame animations. The PSD file specifications indicate that Timeline information is stored at resource ID 0x0433, but it does not provide instructions on how to interpret this data. It probably wouldn't be too hard to do so.