Photoshop.pm currently reads resource 0x0bb7 as ClippingPathName with the
comment "(ignoring 6 bytes of unknown data after string)".
Those 6 bytes are actually covered by your reference 7 (Adobe's Photoshop
File Formats Specification), in the "Path resource format" section under
"Clipping path":
If the file contains a resource of type 8BIM with an ID of 2999,
then this resource contains a Pascal-style string containing the name of
the clipping path to use with this image when saving it as an EPS file.
4 byte fixed value for flatness and 2 byte fill rule. 0 = same fill rule,
1 = even odd fill rule, 2 = non zero winding fill rule. The fill rule is
ignored by Photoshop.
The spec is pretty terse, so here is what we've established empirically. We run
production tooling that reads and writes these resources and round-trips
them through Photoshop:
The "4 byte fixed value" is signed 16.16 fixed point, big-endian (i.e.
ExifTool's fixed32s). Current Photoshop writes 0x00010000 = 1.0
for its default. Units are device pixels (this is the PostScript
flatness parameter exposed by Photoshop's Clipping Path dialog, which
accepts fractional values 0.2-100).
The Pascal string is NOT padded to even length inside the payload --
the trailer starts immediately at offset 1+len.
Photoshop's default output is flatness 1.0, fill rule 1 (even-odd).
As the spec says, Photoshop itself ignores the fill rule on read, but
prepress software consumes it.
The trailer must be treated as optional: name-only 0x0bb7 resources
from older/third-party writers exist in the wild.
Photoshop.pm currently reads resource 0x0bb7 as ClippingPathName with the
comment "(ignoring 6 bytes of unknown data after string)".
Those 6 bytes are actually covered by your reference 7 (Adobe's Photoshop
File Formats Specification), in the "Path resource format" section under
"Clipping path":
The spec is pretty terse, so here is what we've established empirically. We run
production tooling that reads and writes these resources and round-trips
them through Photoshop:
The "4 byte fixed value" is signed 16.16 fixed point, big-endian (i.e.
ExifTool's fixed32s). Current Photoshop writes 0x00010000 = 1.0
for its default. Units are device pixels (this is the PostScript
flatness parameter exposed by Photoshop's Clipping Path dialog, which
accepts fractional values 0.2-100).
The Pascal string is NOT padded to even length inside the payload --
the trailer starts immediately at offset 1+len.
Photoshop's default output is flatness 1.0, fill rule 1 (even-odd).
As the spec says, Photoshop itself ignores the fill rule on read, but
prepress software consumes it.
The trailer must be treated as optional: name-only 0x0bb7 resources
from older/third-party writers exist in the wild.
I've shared sample files and a suggested patch.
I don't know why, but Sourceforge decided your post needed to be locked and get moderation approval.
I see the patch, but I don't see any sample files attached.
If you can't upload the sample, you can mail it to exiftool@gmail.com
voila!
Thanks! This patch will appear in 13.65