• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Question about PiPL TLV encoding

Community Beginner ,
Sep 12, 2021 Sep 12, 2021

Copy link to clipboard

Copied

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

TOPICS
SDK

Views

139

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Beginner ,
Sep 12, 2021 Sep 12, 2021

Copy link to clipboard

Copied

In the attachment you find another analysis I did.

I also verified that the cnvtpipl tool does not use implicit padding as mentioned by the PICA documentation, so I am very sure that the PICA documentation is wrong...

Furthermore, Photoshop does not accept PIPL entries where the length value is not a multiple of 4

... this means: The PIPL structure cannot hold binary data which has not a length that is not a multiple of 4

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 12, 2021 Sep 12, 2021

Copy link to clipboard

Copied

LATEST

Addendum:

 

The SDK CC 2017 writes at pluginsdk/documentation/html/struct_p_i_property.html the same sentence that was written in the PICA API:

 

int32 PIProperty::propertyLength
Length of propertyData.
Does not include any padding bytes to achieve four byte alignment. May be zero.

 

This conflicts with the definition of pluginsdk\photoshopapi\pica_sp\SPPiPL.h and the behavior of Photoshop.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines