psd_tools.psd.tagged_blocks

Tagged block data structure.

Todo

Support the following tagged blocks: TaggedBlockID.PATTERN_DATA, TaggedBlockID.TYPE_TOOL_INFO, TaggedBlockID.LAYER, TaggedBlockID.ALPHA

TaggedBlocks

class psd_tools.psd.tagged_blocks.TaggedBlocks(items=NOTHING)[source]

Dict of tagged blocks.

Example:

from psd_tools.constants import TaggedBlockID

# Iterate over fields
for key in tagged_blocks:
    print(key)

# Get a field
block = tagged_blocks.get(TaggedBlockID.TYPE_TOOL_OBJECT_SETTING)
type_setting = block.data

block = tagged_blocks[TaggedBlockID(b'TySh')]

TaggedBlock

class psd_tools.psd.tagged_blocks.TaggedBlock(signature=b'8BIM', key=b'', data=b'')[source]

Layer tagged block with extra info.

key

4-character code. See TaggedBlock

data

Data.