Question about PiPL TLV encoding
Hello,
I think I have found a defect in one of the definitions of the „Length“ value of the TLV (Type, Length, Value) members of the PiPL structure, which is used to describe plugins to the host application like Photoshop.
Probably correct: The length value must include everything, including paddings.
Why do I think that it is correct?
1. Adobe writes in SPPiPL.h: "Number of characters in the data array. Rounded to a multiple of 4."
2. Official Adobe plugins, e.g. „3D Transform.8bf“ are rounding the length to a multiple of 4 (actually, rounding to the next possible multiple 4, so that padding is always guaranteed).
3. If I do not follow this rule, Photoshop will not display the plug-in.
Possibly not correct:
- The 1997 PICA documentation (page 23) and the 1996 "Cross-Application Plug-in Development Resource Guide" describe both: "Contains the length of the propertyData field. It does not include any padding bytes after propertyData to achieve four byte alignment. This field may be zero."
I know, these documents are 25 years old, however, they are included and linked in the official SDK of Photoshop and there is not errata/update.
My question is, can somebody confirm that there is indeed a defect in the PICA documentation, or am I misunderstanding something? It is very weird because there are two documentations which state this, and it conflicts in what I have been doing all the time
Thank you very much
