Skip navigation
Currently Being Moderated

Missing information in Actions file specification

Jun 11, 2006 10:23 PM

I wrote some code that parses the Photoshop Actions palette file. I used the Photoshop CS2 File Formats Specification PDF (dated June 2005) to understand its format. However, the following OSType keys of the "Reference Structure" type are not documented:

'Idnt' (Identifier)
'indx' (Index)
'name' (Name)

They are mentioned in Table 3.4, page 62 of the PDF.

This seems to be a lack in the document since all the other many elements are explained in great detail. Can anybody provide details of these missing fields? What I need is information on their size (length in bytes) and/or the description of their physical structure in the Actions file. I searched this forum for more info to no avail.

Thanks in advance,

Ettore Pasquini
 
Replies
  • Currently Being Moderated
    Jun 13, 2006 7:07 AM   in reply to (Ettore_Pasquini)
    Ettore Pasquini wrote:
    > I wrote some code that parses the Photoshop Actions palette file. I used the Photoshop CS2 File Formats Specification PDF (dated June 2005) to understand its format. However, the following OSType keys of the "Reference Structure" type are not documented:
    >
    > 'Idnt' (Identifier)
    > 'indx' (Index)
    > 'name' (Name)
    >

    'Idnt' - a standard 4 byte key/id (e.g. 'Lyr ')
    'indx' - a 4 byte word/integer
    'name' - a unicode string (4 byte length, the length in 2 byte unicode chars,
    and 0x0000 as a terminator). I actually don't remember if the 0x0000 is in the
    length count or not.

    -X

    --
    for photoshop scripting solutions of all sorts
    contact: xbytor@gmail.com
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 13, 2006 7:10 AM   in reply to (xbytor)
    BTW, I have translators in Javascript that can do full binary reads/writes of
    action files in CS and CS2 (and probably PS7). I can translate actions to and
    from XML and to Javascript, which can be fairly handy.

    -X

    --
    for photoshop scripting solutions of all sorts
    contact: xbytor@gmail.com
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 21, 2006 8:00 PM   in reply to (Ettore_Pasquini)
    Name, Index, and Identifier (along with all other reference types) have a value
    structured like
    'unicode string' - 'desired classID' - 'actual value'

    The initial unicode string is not meaningful, as near as I can tell. It does get
    populated by actions on very rare occasions, but does not appear to be used
    anywhere. I always write it out as an empty unicode string and the action
    behaves the same.

    You've accurately deduced the classID part.

    I should have mentioned all of this in the previous email.

    For Name, the value is a Unicode string.
    For Index, the value is a simple 4 byte word.
    For Identifier, values a simple 4 byte key-classID.

    I have a test script that generates writes/read/writes and verifies descriptors
    in Javascript. This includes the code for ieee754 floats, Alias (pth or alis),
    and raw (tdta) data types. I haven't tested my Alias code out on an action
    created on a Mac, though. The only one I haven't figured out at all is
    ObjectArray (ObAr). I can't create it with the JS API nor have I found it in my
    largish collection of Action files.

    If you'd like, I can send you the script(s) that I use for my implementation and
    testing. You might find it of some use in your work. I also have a partial perl
    implementation if that's more your speed.

    Ettore Pasquini wrote:
    > thanks for the reply xbytor.
    >
    > 'indx' - a 4 byte word/integer
    > 'name' - a unicode string
    >
    >
    >
    >
    > According to my tests those mappings don't work. I have some actions files with those elements and the file is not correctly parsed if I adopt the formats above. However I found out the following seems to work:
    >
    > 'indx' :
    > Variable - Unicode string;
    > Variable - 4 bytes of length followed by ASCII string;

    No. This is a classID.

    > 4 - 4 additional bytes of unknown meaning.

    This is the actual value of the index. I see it used a lot when indexing a
    document's layers.

    >
    > 'name' :
    > Variable - Unicode string;
    > Variable - classID: 4 bytes (length), followed either by string or (if length is zero) 4-byte classID;
    > Variable - Unicode string.

    Exactly right.

    >
    > This is based entirely on empirical observations and of course it could be wrong. But so far these formats seems to satisfy the data in all my actions files.
    >
    > For the 'Idnt' element I haven't the slightest idea of what it could be, since I never saw one in an Actions Palette file.

    I can create Idnt's but I don't recall having seen them either.

    > Can anyone from Adobe please provide this information and verify the above hypotheses? It would be extremely helpful. Thanks!
    >
    > -Ettore

    Let me know if you want the scripts.

    --
    for photoshop scripting solutions of all sorts
    contact: xbytor@gmail.com
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 22, 2006 1:36 PM   in reply to (Ettore_Pasquini)
    Ettore Pasquini wrote:
    > Xbytor, your insights are most welcomed.
    >
    > Funny, I realized my mistake on the 'indx' element just last night and yes, my corrections exactly match the structure you proposed in the last message.
    >
    > I am just curious: if you have never seen an 'Idnt' element, how did you come up with a structure for it? Good job, and if it does work, hats off. :-)
    >
    I can create descriptors in the Javascript API and write them to disk. And,
    anyway, the JS API for Identifiers is always a long. Examining a generated file
    with a hex editor verifies this.

    >
    >
    >
    >
    > Just making sure, is the value a fixed length (4 bytes) or is it a variable length (*) like any other ClassID element mentioned in the Adobe document (e.g. like the one in the 'prop' structure)?
    When say 'key-classID' I mean the 4 byte version with the 4 byte null prefix.
    When I say 'classID' I mean the variable structure like 'prop'.

    >
    > ps.
    > Thanks for the offer of the scripts. Unfortunately, my company has a strict policy on using licensed / copyrighted code, even if it's open-source. Therefore, I'll ask you this: are your scripts public domain? In that case I can use them, otherwise I'd have to decline your kind offer.

    My code is covered by http://creativecommons.org/licenses/LGPL/2.1. The terms
    basically prevent anybody from calling my code theirs. If you need different
    terms, let me know via email.

    -X

    --
    for photoshop scripting solutions of all sorts
    contact: xbytor@gmail.com
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 26, 2012 5:16 PM   in reply to (Ettore_Pasquini)

    This is kind of an old thread, but beyond the missing reference types described above, the documentation also doesn’t mention that raw data in descriptors ('tdta') begins with a long integer length, which is then followed by that specified number of bytes.

     

    > For the 'Idnt' element I haven't the slightest idea of what it could be, since I never saw one in an Actions Palette file.

     

    Referening to objects by ID is not tremendously useful in saved actions, because IDs are determined at runtime, but it can be very nice for automation plugins or scripts. Using an ID to refer to a document, layer, history state, or other object has the advantage that the ID is unambiguous (unlike a name), and doesn’t change during the life of an object (unlike the index or offset).

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)