EmilDohne / PhotoshopAPI

A modern and performant C++20 read/write parser of Photoshop Files (*.psd and *.psb) with fully fledged Python bindings hosted on PyPi
https://photoshopapi.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
103 stars 11 forks source link

Restructure Tagged Blocks #7

Closed EmilDohne closed 11 months ago

EmilDohne commented 11 months ago

Tagged blocks before were a bit cumbersome to work with as, due to its dependency on LayerInfo, we had issues with recursive includes.

This has been solved in two separate steps:

  1. TaggedBlocks are now stored in a TaggedBlockStorage struct which doesnt have any information about what the tagged block actually are
  2. AdditionalLayerInfo was moved to a separate file that then includes TaggedBlockStorage leading the include tree to look something like this
    - LayerAndMaskInformation.h
    - AdditionalLayerInfo.h
      - TaggedBlockStorage.h
    - TaggedBlock.h
    - LayerAndMaskInformation.h

This way we stopped the recursive includes as TaggedBlockStorage is separated from the TaggedBlocks themselves