The PSD format and layer groups
Hi all!
I'm currently working on a C++ and PHP library for obtaining information about PSD files; meaning that the library extracts information about every layer in the PSD. The library is not designed for decoding and/or displaying the image data in a PSD file, it is merely for extracting information about layers, their visibility and groups.
Now I realise that this might not be the place to ask this question, however I'm looking for people who can help me explain a bit about the file format. I'm using the documentation by Adobe as reference, which can be found here: Adobe Photoshop File Formats Specification
I'm trying to determine where a layer group starts and ends. I've noticed upon processing the file with my library at some point I come across a layer named '</Layer group>', which probably denotes the end of a layer group, however I can't figure out where the group begins.
I'm also wondering how I can detect a smart object, considering it's another way of grouping layers; however, in the file format each component of the smart object (including the smart object itself) are listed as layers. They are all (including the group entities) layer records, which are described here: Adobe Photoshop File Formats Specification (refers to the section of the document about layer records).
Can anyone point me in the right direction?
Cheers,
Bas Groothedde
