Rev 498 | Rev 511 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 498 | Rev 503 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /* |
1 | /* |
2 | This file is part of "Filter Foundry", a filter plugin for Adobe Photoshop |
2 | This file is part of "Filter Foundry", a filter plugin for Adobe Photoshop |
3 | Copyright (C) 2003-2009 Toby Thain, toby@telegraphics.com.au |
3 | Copyright (C) 2003-2009 Toby Thain, toby@telegraphics.com.au |
4 | Copyright (C) 2018-2021 Daniel Marschall, ViaThinkSoft |
4 | Copyright (C) 2018-2022 Daniel Marschall, ViaThinkSoft |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify |
6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by |
7 | it under the terms of the GNU General Public License as published by |
8 | the Free Software Foundation; either version 2 of the License, or |
8 | the Free Software Foundation; either version 2 of the License, or |
9 | (at your option) any later version. |
9 | (at your option) any later version. |
Line 174... | Line 174... | ||
174 | pipl->count += 3; // 3 more keys in PiPL: name, catg, hstm |
174 | pipl->count += 3; // 3 more keys in PiPL: name, catg, hstm |
175 | 175 | ||
176 | p = (char*)pipl + origsize; |
176 | p = (char*)pipl + origsize; |
177 | prop = (PIProperty*)p; |
177 | prop = (PIProperty*)p; |
178 | 178 | ||
- | 179 | /* Important not about proptyLength: |
|
- | 180 | |
|
- | 181 | In regards propertyLength, Adobe writes in SPPiPL.h: |
|
- | 182 | "Number of characters in the data array. Rounded to a multiple of 4." |
|
- | 183 | ||
- | 184 | On the other hand, the 1997 PICA documentation(page 23) and |
|
- | 185 | 1996 "Cross-Application Plug-in Development Resource Guide" describes : |
|
- | 186 | "[propertyLength] contains the length of the propertyData field. It does not include any padding bytes after |
|
- | 187 | propertyData to achieve four byte alignment.This field may be zero." |
|
- | 188 | ||
- | 189 | I think this is not correct, since even official plugins of Adobe(e.g. "3D Transform.8bf") and cnvtpipl |
|
- | 190 | are rounding the length to a multiple of 4 (actually, rounding to the next possible multiple 4, |
|
- | 191 | so that padding is always guaranteed). |
|
- | 192 | Photoshop (tested with Photoshop 7) will crash if the propertyLength follows the definition of PICA. |
|
- | 193 | */ |
|
- | 194 | ||
179 | /* add Title/Name property key */ |
195 | /* add Title/Name property key */ |
180 | 196 | ||
181 | prop->vendorID = kPhotoshopSignature; |
197 | prop->vendorID = kPhotoshopSignature; |
182 | prop->propertyKey = PINameProperty; |
198 | prop->propertyKey = PINameProperty; |
183 | prop->propertyID = 0; |
199 | prop->propertyID = 0; |