Skip to main content
Inspiring
January 31, 2017
Question

How to get animation frame ID?

  • January 31, 2017
  • 2 replies
  • 1296 views

Hello!

I'm trying to get identifiers of frames on the timeline panel (Frame animation mode).

I see, that they are stored inside Image Resource Section of PSD file.

Resource ID is 4000 (0x0fa0) which is supposed to be used by plug-ins.

But I can't figure out how to get them using javascript or OLE-automation. Is it possible?

And if not, is it possible to read them from C/C++ plug-in and send to javascript?

This topic has been closed for replies.

2 replies

Tom Ruark
Inspiring
November 27, 2018

There is only this documentation. Adobe Photoshop File Formats Specification

Did you find it in the PSD?

This information is not available at runtime.

Tom Ruark
Inspiring
January 31, 2017

I would try to modify GetHistory in the History example of the C/C++ SDK.

Inspiring
February 1, 2017

There is a method called CountPIResources(type) in SDK. It returns count of pseudo-resources with specified type. But i don't know the type of resource. I have tried different types but count is always 0.

Do you know the exact type of this resource with animation info inside?

Or can I somehow retrive resource type from PSD file?

Here is a dump of resource section block:

It starts with 8BIM (38 42 49 4d) and resource id = 4000 (0f a0)

Black blocks are null pascal string (00 00) and 4bites with resource size

Red 8 bytes are unkown.

Next 4 bytes looks like another size.

Green bytes looks like a header of a descriptor: 8BIM 'AnDs' and 4 bytes with size.

Next 4 bytes is a descriptor version (always 16)

Other bytes are descriptor data with animation frame info that I need.

I've tried to use red bytes as a type ('mani' and 'IRFR') without results.

Also there is an old thread (link) where you gave some piece of code which works with this information. So you are definetly aware of what is going on here. Please, help.

Inspiring
February 2, 2017

First 4 red bytes is a type written backwards - 'inam'.