psd_tools.psd.patterns

Patterns structure.

Patterns

class psd_tools.psd.patterns.Patterns(items=NOTHING)[source]

List of Pattern structure. See Pattern.

Pattern

class psd_tools.psd.patterns.Pattern(version: int = 1, image_mode=ColorMode.RGB, point=None, name: str = '', pattern_id: str = '', color_table=None, data=None)[source]

Pattern structure.

version
image_mode

See ColorMode

point

Size in tuple.

name

str name of the pattern.

pattern_id

ID of this pattern.

color_table

Color table if the mode is INDEXED.

data

See VirtualMemoryArrayList

VirtualMemoryArrayList

class psd_tools.psd.patterns.VirtualMemoryArrayList(version: int = 3, rectangle=None, channels=None)[source]

VirtualMemoryArrayList structure. Container of channels.

version
rectangle

Tuple of int

channels

List of VirtualMemoryArray

VirtualMemoryArray

class psd_tools.psd.patterns.VirtualMemoryArray(is_written=0, depth=None, rectangle=None, pixel_depth=None, compression=Compression.RAW, data=b'')[source]

VirtualMemoryArrayList structure, corresponding to each channel.

is_written
depth
rectangle
pixel_depth
compression
data
get_data()[source]

Get decompressed bytes.

set_data(size, data, depth, compression=0)[source]

Set bytes.