高手们.如何从PSD文件中提取路径(Path)信息?

bitwang2006 2006-02-09 02:13:01
如何从PSD文件中提取路径(Path)信息?
...全文
559 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
大可山人 2006-02-10
  • 打赏
  • 举报
回复
好贴,顶!
寻开心 2006-02-10
  • 打赏
  • 举报
回复
补充
http://www.wotsit.org/search.asp
输入psd搜说可以找到相关的文档说明
zzwu 2006-02-10
  • 打赏
  • 举报
回复
详细可参看psd文件格式的完整资料:

http://www.zzwu.cn/format/graphics/PSD.pdf
zzwu 2006-02-10
  • 打赏
  • 举报
回复
找到一点信息,未仔细看:

Path resource format:

Photoshop stores the paths saved with an image in an image resource block.
These resource blocks consist of a series of 26 byte path point records, and so
the resource length should always be a multiple of 26.
Photoshop stores its paths as resources of type 8BIM with IDs in the range
2000 through 2999. These numbers should be reserved for Photoshop. The
name of the resource is the name given to the path when it was saved.
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.
The path format returned by GetProperty() call is identical to what is
described below. Refer to the IllustratorExport sample plug–in code to
see how this resource data is constructed.

Path points:
------------
All points used in defining a path are stored in eight bytes as a pair of 32–bit
components, vertical component first.
The two components are signed, fixed point numbers with 8 bits before the
binary point and 24 bits after the binary point. Three guard bits are reserved
in the points to eliminate most concerns over arithmetic overflow. Hence,
the range for each component is 0xF0000000 to 0x0FFFFFFF representing a
range of –16 to 16. The lower bound is included, but not the upper bound.
This limited range is used because the points are expressed relative to the
image size. The vertical component is given with respect to the image
height, and the horizontal component is given with respect to the image
width. [0,0] represents the top–left corner of the image; [1,1]
([0x01000000,0x01000000]) represents the bottom–right.
In Windows, the byte order of the path point components are reversed; you
should swap the bytes when accessing each 32–bit value.

Path records:
-------------
The data in a path resource consists of one or more 26-byte records. The first
two bytes of each record is a selector to indicate what kind of path it is. For
Windows, you should swap the bytes before accessing it as a short (int16).
The first 26-byte path record contains a selector value of 6, path fill rule
record. The remaining 24 bytes of the first record are zeroes. Paths use even/

Table 2–5: Path data record types:
-----------------------------------
Selector Description
0 Closed subpath length record
1 Closed subpath Bezier knot, linked
2 Closed subpath Bezier knot, unlinked
3 Open subpath length record
4 Open subpath Bezier knot, linked
5 Open subpath Bezier knot, unlinked
6 Path fill rule record
7 Clipboard record
bitwang2006 2006-02-10
  • 打赏
  • 举报
回复
难到真的没人知道?

4,496

社区成员

发帖
与我相关
我的任务
社区描述
图形图像/机器视觉
社区管理员
  • 机器视觉
  • 迪菲赫尔曼
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧