Adobe PhotoshopFile Formats Specification
一 、PSD 说明
psd分成5块, 分别是头文件、颜色模式、图片资源、图层和蒙版信息、图像信息
二、PSD 头文件解析
标签(signature): 4个字节, “8BPS”
版本(version): 2 个字节, 1
保留字节(reserved): 6 个字节, 0填充
图像的通道数量 (the number of channel in the image): 2 个字节, 1 -56
图像的高度(the height of the image in pixels): 4 个字节, 1- 30000
图像的宽度(the width of the image in pixels): 4 个字节, 1-30000
每通道的位数(the number of bits per channel): 2 个字节 , 1/8/16/32
颜色模式 (the color mode of the file): 2 个字节, 0/1/2/3/4/7/8/9