Get the layer details of a tiff using LibTiff
HI,
Photoshop layers are stored in tag or field 37724, identified as TIFFTAG_IMAGESOURCEDATA in the latest libtiff.
The data blob shall be an array of uint8_t, and shall be headed by a magic signature that is one of the following null terminated ASCII strings:
- for standard Photoshop files, Adobe Photoshop Document Data Block.
- for Large Document Format (8BPB/PSB) files, Adobe Photoshop Document Data V0002 (the last five characters differ).
After the magic signature, the remainder of the blob is comprised of a series of Additional Layer Information blocks:
- signature: 8BIM (4 bytes)
- block type (4 bytes)
- length of the block (4 bytes, variable, padded to a 4-byte offset)
- data of the block (length as above)
The Technical Notes say that these are the available block types:
- Layr (layer block)
- LMsk (global mask info block)
- Patt (pattern definition block)
- Anno (annotations)
Has anyone figured how to get the individual layer details using libtiff.
I would really appreciate any thoughts/suggestions on the matter.
Thanks all.
