---
name: "psd-tools"
section: "1"
platform: "linux"
package: "python3-psd-tools"
version: "1.10.7+dfsg.1-1+deb13u1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/psd-tools"
---

# psd-tools(1)

src Documentation psd-tools is a Python package for working with Adobe Photoshop PSD files as described in specification.

## NAME

src - src Documentation

*psd-tools* is a Python package for working with Adobe Photoshop PSD files as described in *specification*.

## INSTALLATION

Use *pip* to install the package:

```
pip install psd-tools
```

**NOTE:**

In order to extract images from 32bit PSD files PIL/Pillow must be built with LITTLECMS or LITTLECMS2 support (**apt-get install liblcms2-2** or **brew install little-cms2**)

## GETTING STARTED

```
from psd_tools import PSDImage
psd = PSDImage.open('example.psd')
psd.composite().save('example.png')
for layer in psd:
    print(layer)
    image = layer.composite()
```

Check out the *Usage* documentation for more examples.

### Usage

### Command line

The package provides command line tools to handle a PSD document:

```
psd-tools export <input_file> <output_file> [options]
psd-tools show <input_file> [options]
psd-tools debug <input_file> [options]
psd-tools -h | --help
psd-tools --version
```

Example:

```
psd-tools show example.psd  # Show the file content
psd-tools export example.psd example.png  # Export as PNG
psd-tools export example.psd[0] example-0.png  # Export layer as PNG
```

### Working with PSD document

**psd\_tools.api** package provides the user-friendly API to work with PSD files. *PSDImage* represents a PSD file.

Open an image:

```
from psd_tools import PSDImage
psd = PSDImage.open('my_image.psd')
```

Most of the data structure in the **psd-tools** suppports pretty printing in IPython environment.

```
In [1]: PSDImage.open('example.psd')
Out[1]:
PSDImage(mode=RGB size=101x55 depth=8 channels=3)
  [0] PixelLayer('Background' size=101x55)
  [1] PixelLayer('Layer 1' size=85x46)
```

Internal layers are accessible by iterator or indexing:

```
for layer in psd:
    print(layer)
    if layer.is_group():
        for child in layer:
            print(child)
child = psd[0][0]
```

**NOTE:**

The iteration order is from background to foreground, which is reversed from version prior to 1.7.x. Use **reversed(list(psd))** to iterate from foreground to background.

The opened PSD file can be saved:

```
psd.save('output.psd')
```

If the PSD File's layer structure was updated, saving it will update the ImagaData section to produce an accurate thumbnail.

### Working with Layers

There are various layer kinds in Photoshop.

The most basic layer type is *PixelLayer*:

```
print(layer.name)
layer.kind == 'pixel'
```

Some of the layer attributes are editable, such as a layer name:

```
layer.name = 'Updated layer 1'
```

It is possible to create a new PixelLayer from a PIL object, the PIL image will be converted to the color mode of the PSD File given in parameter:

```
PixelLayer.frompil(pil_image, psd_file, "Layer name", top_offset, left_offset, Compression.RLE)
```

See the function documentation for further parameter explanations.

*Group* has internal layers:

```
for layer in group:
    print(layer)
first_layer = group[0]
```

Create a new group object.:

```
Group.new("Group name", open_folder=True, parent=parent_group)
```

*TypeLayer* is a layer with texts:

```
print(layer.text)
```

*ShapeLayer* draws a vector shape, and the shape information is stored in *vector\_mask* and *origination* property. Other layers can also have shape information as a mask:

```
print(layer.vector_mask)
for shape in layer.origination:
    print(shape)
```

*SmartObjectLayer* embeds or links an external file for non-destructive editing. The file content is accessible via *smart\_object* property:

```
import io
if layer.smart_object.filetype in ('jpg', 'png'):
    image = Image.open(io.BytesIO(layer.smart_object.data))
```

*SolidColorFill*, *PatternFill*, and *GradientFill* are fill layers that paint the entire region if there is no associated mask. Sub-classes of **AdjustmentLayer** represents layer adjustment applied to the composed image. See *Adjustment layers*.

### Modifying the layer structure

The layer structure of a PSD object can be modified through methods emulating a python list.

The internal model of the psd layer structure will be automatically updated when saving the psd to a file or a similar operation. Moving a layer from a PSD to another will also automatically convert the PixelLayer to the target psd's color mode.

The follwing are valid for both PSDImage and Group objects.

Set an item:

```
group[0] = layer
```

Add a layer to a group:

```
group.append(layer)
```

Add a list of layers to a group:

```
group.extend(layers)
```

Insert a layer to a specific index in the group:

```
group.insert(3, layer)
```

Remove a layer from the a group:

```
group.remove(layer)
```

Pop a layer from the group:

```
layer = group.pop()
```

Emptying a layer group:

```
group.clear()
```

Get the index of a layer in the group:

```
group.index(layer)
```

Count the occurences of a layer in a group:

```
group.count(layer)
```

Move a given list of layers in a newly created Group. If no parent group is given in parameter, the new group will replace the first layer of the list in the PSD structure:

```
Group.group_layers(layer_list, "Group Name", parent=parent_group, open_folder=True)
```

Below an example of such an operation.:

```
- PSDImage
    - Group 1
        - PixelLayer
        - FillLayer
    - PixelLayer
    - TypeLayer
    - SmartObjectLayer
    - PixelLayer
Group.group_layers(PSDImage[:2], "New Group")
- PSDImage
    - New Group
        - Group 1
            - PixelLayer
            - FillLayer
        - PixelLayer
        - TypeLayer
    - SmartObjectLayer
    - PixelLayer
```

Some operations are available for all Layer objects.

Delete a layer from its layer structure:

```
layer.delete()
```

Layers can be moved from a group to another:

```
layer.move_to_group(target_group)
```

Layers can be moved within the group to change their order:

```
layer.move_up(5) # Will send the layer upward in the group
layer.move_down(3) # Will send the layer downward in the group
```

### Exporting data to PIL

Export the entire document as **PIL.Image**:

```
image = psd.composite()
image.save('exported.png')
```

Export a single layer including masks and clipping layers:

```
image = layer.composite()
```

Export layer and mask separately without composition:

```
image = layer.topil()
mask = layer.mask.topil()
```

To composite specific layers, such as layers except for texts, use layer\_filter option:

```
image = psd.composite(
    layer_filter=lambda layer: layer.is_visible() and layer.kind != 'type')
```

Note that most of the layer effects and adjustment layers are not supported. The compositing result may look different from Photoshop.

### Exporting data to NumPy

PSDImage or layers can be exported to NumPy array by *numpy()* method:

```
image = psd.numpy()
layer_image = layer.numpy()
```

### Migrating to 1.10

psd-tools 1.10 has a few breaking changes.

Basic layer structure editing is supported in 1.10. You can add or remove a pixel layer, or change the grouping of layers.

psd-tools 1.10 drops *compose* module. Use *composite* instead.

version 1.10.x:

```
image = psd.composite()
layer_image = layer.composite()
```

### Migrating to 1.9

psd-tools 1.9 switches to NumPy based compositing.

version 1.8.x:

```
psd = PSDImage.open(filename)
image = psd.compose()
layer = psd[0]
layer_image = layer.compose()
```

version 1.9.x:

```
psd = PSDImage.open(filename)
image = psd.composite()
layer = psd[0]
layer_image = layer.composite()
```

NumPy array API is introduced:

```
image = psd.numpy()
layer_image = layer.numpy()
```

### Migrating to 1.8

There are major API changes in version 1.8.x.

**NOTE:**

In version 1.8.0 - 1.8.7, the package name was *psd\_tools2*.

### PSDImage

File open method is changed from *load* to *open()*.

version 1.7.x:

```
psd = PSDImage.load(filename)
with open(filename, 'rb') as f:
    psd = PSDImage.from_stream(f)
```

version 1.8.x:

```
psd = PSDImage.open(filename)
with open(filename, 'rb') as f:
    psd = PSDImage.open(f)
```

### Layers

Children of PSDImage or Group is directly accessible by iterator or indexing.

version 1.7.x:

```
for layer in group.layers:
    print(layer)
first_child = group.layers[0]
```

version 1.8.x:

```
for layer in group:
    print(layer)
first_child = group[0]
```

In version 1.8.x, the order of layers is reversed to reflect that the index should not change when a new layer is added on top.

### PIL export

Primary PIL export method is **compose()**.

version 1.7.x:

```
image = psd.as_PIL()
layer_image = compose(layer)
raw_layer_image = layer.as_PIL()
```

version 1.8.x:

```
image = psd.compose()
layer_image = layer.compose()
raw_layer_image = layer.topil()
```

### Low-level data structure

Data structures are completely rewritten to support writing functionality. See *psd\_tools.psd* subpackage.

version 1.7.x:

```
psd.decoded_data
```

version 1.8.x:

```
psd._record
```

### Drop pymaging support

Pymaging support is dropped.

### Contributing

Development happens at github: *bug tracker*. Feel free to submit *bug reports* or pull requests. Attaching an erroneous PSD file makes the debugging process faster. Such PSD file might be added to the test suite.

The license is MIT.

### Package design

The package consists of two major subpackages:

- 1\.

  - ***psd\_tools.psd*: subpackage that reads/writes low-level binary**

    structure of the PSD/PSB file. The core data structures are built around *attrs* class that all implement *read* and *write* methods. Each data object tries to resemble the structure described in the *specification*. Although documented, the *specification* is far from complete and some are even inaccurate. When *psd-tools* finds unknown data structure, the package keeps such data as *bytes* in the parsed result.

- 2\.

  - **psd\_tools.api: User-facing API that implements various**

    easy-to-use methods that manipulate low-level *psd\_tools.psd* data structures.

### Testing

In order to run tests, make sure PIL/Pillow is built with LittleCMS or LittleCMS2 support. For example, on Ubuntu, install the following packages:

```
apt-get install liblcms2-dev libjpeg-dev libfreetype6-dev zlib1g-dev
```

Then install *psd-tools* with the following command:

```
pip install -e .[dev]
```

Finally, run tests with *pytest*:

```
pytest
```

### Documentation

Install Sphinx to generate documents:

```
pip install sphinx sphinx_rtd_theme
```

Once installed, use *Makefile*:

```
make docs
```

### Acknowledgments

Great thanks to *all the contributors*.

## FEATURES

Supported:

- •

  Read and write of the low-level PSD/PSB file structure

- •

  Raw layer image export in NumPy and PIL format

Limited support:

- •

  Composition of basic pixel-based layers

- •

  Composition of fill layer effects

- •

  Vector masks

- •

  Editing of some layer attributes such as layer name

- •

  Blending modes except for dissolve

- •

  Drawing of bezier curves

Not supported:

- •

  Editing of layer structure, such as adding or removing a layer

- •

  Composition of adjustment layers

- •

  Composition of many layer effects

- •

  Font rendering

### psd\_tools

See *Usage* for examples.

### PSDImage

- **class psd\_tools.PSDImage(data: *PSD*)**

  Photoshop PSD/PSB file object.

  The low-level data structure is accessible at **PSDImage.\_record**.

  Example:

  ```
  from psd_tools import PSDImage
  psd = PSDImage.open('example.psd')
  image = psd.compose()
  for layer in psd:
      layer_image = layer.compose()
  ```

  - **append(layer: Layer) -\> None**

    Add a layer to the end (top) of the group

    - **Parameters**

      **layer** -- The layer to add

  - **property bbox: tuple\[int, int, int, int\]**

    Minimal bounding box that contains all the visible layers.

    Use **viewbox** to get viewport bounding box. When the psd is empty, bbox is equal to the canvas bounding box.

    - **Returns**

      (left, top, right, bottom) *tuple*.

  - **property bottom: int**

    Bottom coordinate.

    - **Returns**

      *int*

  - **property channels: int**

    Number of color channels.

    - **Returns**

      *int*

  - **clear() -\> None**

    Clears the group.

  - **property color\_mode: *ColorMode***

    Document color mode, such as 'RGB' or 'GRAYSCALE'. See *ColorMode*.

    - **Returns**

      *ColorMode*

  - **property compatibility\_mode: CompatibilityMode**

    Set the compositing and layer organization compatibility mode. Writable.

    - **Returns**

      **CompatibilityMode**

  - **composite(viewport: tuple\[int, int, int, int\] \| None = None, force: bool = False, color: float \| tuple\[float, ...\] = 1.0, alpha: float = 0.0, layer\_filter: Callable \| None = None, ignore\_preview: bool = False, apply\_icc: bool = True)**

    Composite the PSD image.

    - **Parameters**

      - •

        **viewport** -- Viewport bounding box specified by (x1, y1, x2, y2) tuple. Default is the viewbox of the PSD.

      - •

        **ignore\_preview** -- Boolean flag to whether skip compositing when a pre-composited preview is available.

      - •

        **force** -- Boolean flag to force vector drawing.

      - •

        **color** -- Backdrop color specified by scalar or tuple of scalar. The color value should be in \[0.0, 1.0\]. For example, (1., 0., 0.) specifies red in RGB color mode.

      - •

        **alpha** -- Backdrop alpha in \[0.0, 1.0\].

      - •

        **layer\_filter** -- Callable that takes a layer as argument and returns whether if the layer is composited. Default is *is\_visible()*.

    - **Returns**

      **PIL.Image**.

  - **count(layer: Layer) -\> int**

    Counts the number of occurences of a layer in the group.

    - **Parameters**

      **layer**

  - **property depth: int**

    Pixel depth bits.

    - **Returns**

      *int*

  - **descendants(include\_clip: bool = True) -\> Iterator\[Layer\]**

    Return a generator to iterate over all descendant layers.

    Example:

    ```
    # Iterate over all layers
    for layer in psd.descendants():
        print(layer)
    # Iterate over all layers in reverse order
    for layer in reversed(list(psd.descendants())):
        print(layer)
    ```

    - **Parameters**

      **include\_clip** -- include clipping layers.

  - **extend(layers: Iterable\[Layer\]) -\> None**

    Add a list of layers to the end (top) of the group

    - **Parameters**

      **layers** -- The layers to add

  - **find(name: str) -\> Layer \| None**

    Returns the first layer found for the given layer name

    - **Parameters**

      **name**

  - **findall(name: str) -\> Iterator\[Layer\]**

    Return a generator to iterate over all layers with the given name.

    - **Parameters**

      **name**

  - **classmethod frompil(image: Image, compression=Compression.RLE) -\> Self**

    Create a new PSD document from PIL Image.

    - **Parameters**

      - •

        **image** -- PIL Image object.

      - •

        **compression** -- ImageData compression option. See *Compression*.

    - **Returns**

      A *PSDImage* object.

  - **has\_preview() -\> bool**

    Returns if the document has real merged data. When True, *topil()* returns pre-composed data.

  - **has\_thumbnail() -\> bool**

    True if the PSDImage has a thumbnail resource.

  - **property height: int**

    Document height.

    - **Returns**

      *int*

  - **property image\_resources: *ImageResources***

    Document image resources. *ImageResources* is a dict-like structure that keeps various document settings.

    See *psd\_tools.constants.Resource* for available keys.

    - **Returns**

      *ImageResources*

    Example:

    ```
    from psd_tools.constants import Resource
    version_info = psd.image_resources.get_data(Resource.VERSION_INFO)
    slices = psd.image_resources.get_data(Resource.SLICES)
    ```

    Image resources contain an ICC profile. The following shows how to export a PNG file with embedded ICC profile:

    ```
    from psd_tools.constants import Resource
    icc_profile = psd.image_resources.get_data(Resource.ICC_PROFILE)
    image = psd.compose(apply_icc=False)
    image.save('output.png', icc_profile=icc_profile)
    ```

  - **index(layer: Layer) -\> int**

    Returns the index of the specified layer in the group.

    - **Parameters**

      **layer**

  - **insert(index: int, layer: Layer) -\> None**

    Insert the given layer at the specified index.

    - **Parameters**

      - •

        **index**

      - •

        **layer**

  - **is\_group() -\> bool**

    Return True if the layer is a group.

    - **Returns**

      *bool*

  - **is\_visible() -\> bool**

    Returns visibility of the element.

    - **Returns**

      *bool*

  - **property kind: str**

    Kind.

    - **Returns**

      *'psdimage'*

  - **property left: int**

    Left coordinate.

    - **Returns**

      *0*

  - **property name: str**

    Element name.

    - **Returns**

      *'Root'*

  - **classmethod new(mode: str, size: tuple\[int, int\], color: int = 0, depth: Literal\[8, 16, 32\] = 8, \*\*kwargs: Any)**

    Create a new PSD document.

    - **Parameters**

      - •

        **mode** -- The color mode to use for the new image.

      - •

        **size** -- A tuple containing (width, height) in pixels.

      - •

        **color** -- What color to use for the image. Default is black.

    - **Returns**

      A *PSDImage* object.

  - **numpy(channel: Literal\['color', 'shape', 'alpha', 'mask'\] \| None = None) -\> ndarray**

    Get NumPy array of the layer.

    - **Parameters**

      **channel** -- Which channel to return, can be 'color', 'shape', 'alpha', or 'mask'. Default is 'color+alpha'.

    - **Returns**

      **numpy.ndarray**

  - **property offset: tuple\[int, int\]**

    (left, top) tuple.

    - **Returns**

      *tuple*

  - **classmethod open(fp: BinaryIO \| str \| bytes \| PathLike, \*\*kwargs: Any) -\> Self**

    Open a PSD document.

    - **Parameters**

      - •

        **fp** -- filename or file-like object.

      - •

        **encoding** -- charset encoding of the pascal string within the file, default 'macroman'. Some psd files need explicit encoding option.

    - **Returns**

      A *PSDImage* object.

  - **property parent: None**

    Parent of this layer.

  - **pop(index: int = -1) -\> Layer**

    Removes the specified layer from the list and returns it.

    - **Parameters**

      **index**

  - **remove(layer: Layer) -\> Self**

    Removes the specified layer from the group

    - **Parameters**

      **layer**

  - **property right: int**

    Right coordinate.

    - **Returns**

      *int*

  - **save(fp: BinaryIO \| str \| bytes \| PathLike, mode: str = 'wb', \*\*kwargs: Any) -\> None**

    Save the PSD file. Updates the ImageData section if the layer structure has been updated.

    - **Parameters**

      - •

        **fp** -- filename or file-like object.

      - •

        **encoding** -- charset encoding of the pascal string within the file, default 'macroman'.

      - •

        **mode** -- file open mode, default 'wb'.

  - **property size: tuple\[int, int\]**

    (width, height) tuple.

    - **Returns**

      *tuple*

  - **property tagged\_blocks: *TaggedBlocks* \| None**

    Document tagged blocks that is a dict-like container of settings.

    See *psd\_tools.constants.Tag* for available keys.

    - **Returns**

      *TaggedBlocks* or *None*.

    Example:

    ```
    from psd_tools.constants import Tag
    patterns = psd.tagged_blocks.get_data(Tag.PATTERNS1)
    ```

  - **thumbnail() -\> Image \| None**

    Returns a thumbnail image in PIL.Image. When the file does not contain an embedded thumbnail image, returns None.

  - **property top: int**

    Top coordinate.

    - **Returns**

      *0*

  - **topil(channel: int \| *ChannelID* \| None = None, apply\_icc: bool = True) -\> Image \| None**

    Get PIL Image.

    - **Parameters**

      - •

        **channel** -- Which channel to return; e.g., 0 for 'R' channel in RGB image. See *ChannelID*. When *None*, the method returns all the channels supported by PIL modes.

      - •

        **apply\_icc** -- Whether to apply ICC profile conversion to sRGB.

    - **Returns**

      **PIL.Image**, or *None* if the composed image is not available.

  - **property version: int**

    Document version. PSD file is 1, and PSB file is 2.

    - **Returns**

      *int*

  - **property viewbox: tuple\[int, int, int, int\]**

    Return bounding box of the viewport.

    - **Returns**

      (left, top, right, bottom) *tuple*.

  - **property visible: bool**

    Visibility.

    - **Returns**

      *True*

  - **property width: int**

    Document width.

    - **Returns**

      *int*

### psd\_tools.api.adjustments

Adjustment and fill layers.

Example:

```
if layer.kind == 'brightnesscontrast':
    print(layer.brightness)
if layer.kind == 'gradientfill':
    print(layer.gradient_kind)
```

### Fill layers

Fill layers are similar to *ShapeLayer* except that the layer might not have an associated vector mask. The layer therefore expands the entire canvas of the PSD document.

Fill layers all inherit from **FillLayer**.

Example:

```
if isinstance(layer, psd_tools.layers.FillLayer):
    image = layer.compose()
```

### SolidColorFill

- **class psd\_tools.api.adjustments.SolidColorFill(\*args: Any)**

  Solid color fill.

  - **property bbox: tuple\[int, int, int, int\]**

    (left, top, right, bottom) tuple.

  - **property blend\_mode: *BlendMode***

    Blend mode of this layer. Writable.

    Example:

    ```
    from psd_tools.constants import BlendMode
    if layer.blend_mode == BlendMode.NORMAL:
        layer.blend_mode = BlendMode.SCREEN
    ```

    - **Returns**

      *BlendMode*.

  - **property bottom: int**

    Bottom coordinate.

    - **Returns**

      int

  - **property clip\_layers: list\[Self\]**

    Clip layers associated with this layer.

    - **Returns**

      list of layers

  - **property clipping\_layer: bool**

    Clipping flag for this layer. Writable.

    - **Returns**

      *bool*

  - **composite(viewport: tuple\[int, int, int, int\] \| None = None, force: bool = False, color: float \| tuple\[float, ...\] \| ndarray = 1.0, alpha: float \| ndarray = 0.0, layer\_filter: Callable \| None = None, apply\_icc: bool = True) -\> Image \| None**

    Composite layer and masks (mask, vector mask, and clipping layers).

    - **Parameters**

      - •

        **viewport** -- Viewport bounding box specified by (x1, y1, x2, y2) tuple. Default is the layer's bbox.

      - •

        **force** -- Boolean flag to force vector drawing.

      - •

        **color** -- Backdrop color specified by scalar or tuple of scalar. The color value should be in \[0.0, 1.0\]. For example, (1., 0., 0.) specifies red in RGB color mode.

      - •

        **alpha** -- Backdrop alpha in \[0.0, 1.0\].

      - •

        **layer\_filter** -- Callable that takes a layer as argument and returns whether if the layer is composited. Default is *is\_visible()*.

    - **Returns**

      **PIL.Image** or *None*.

  - **property data: DescriptorBlock**

    Color in Descriptor(RGB).

  - **delete\_layer() -\> Self**

    Deletes the layer and all its child layers if the layer is a group from its parent (group or psdimage).

  - **property effects: *Effects***

    Layer effects.

    - **Returns**

      *Effects*

  - **has\_clip\_layers() -\> bool**

    Returns True if the layer has associated clipping.

    - **Returns**

      *bool*

  - **has\_effects() -\> bool**

    Returns True if the layer has effects.

    - **Returns**

      *bool*

  - **has\_mask() -\> bool**

    Returns True if the layer has a mask.

    - **Returns**

      *bool*

  - **has\_origination() -\> bool**

    Returns True if the layer has live shape properties.

    - **Returns**

      *bool*

  - **has\_pixels() -\> bool**

    Returns True if the layer has associated pixels. When this is True, *topil* method returns **PIL.Image**.

    - **Returns**

      *bool*

  - **has\_stroke() -\> bool**

    Returns True if the shape has a stroke.

  - **has\_vector\_mask() -\> bool**

    Returns True if the layer has a vector mask.

    - **Returns**

      *bool*

  - **property height: int**

    Height of the layer.

    - **Returns**

      int

  - **is\_group() -\> bool**

    Return True if the layer is a group.

    - **Returns**

      *bool*

  - **is\_visible() -\> bool**

    Layer visibility. Takes group visibility in account.

    - **Returns**

      *bool*

  - **property kind: str**

    Kind of this layer, such as group, pixel, shape, type, smartobject, or psdimage. Class name without *layer* suffix.

    - **Returns**

      *str*

  - **property layer\_id: int**

    Layer ID.

    - **Returns**

      int layer id. if the layer is not assigned an id, -1.

  - **property left: int**

    Left coordinate. Writable.

    - **Returns**

      int

  - **lock(lock\_flags: int = ProtectedFlags.COMPLETE) -\> None**

    Locks a layer accordind to the combination of flags.

    - **Parameters**

      **lockflags** -- An integer representing the locking state

    Example using the constants of ProtectedFlags and bitwise or operation to lock both pixels and positions:

    ```
    layer.lock(ProtectedFlags.COMPOSITE | ProtectedFlags.POSITION)
    ```

  - **property mask: *Mask* \| None**

    Returns mask associated with this layer.

    - **Returns**

      *Mask* or *None*

  - **move\_down(offset: int = 1) -\> Self**

    Moves the layer down a certain offset within the group the layer is in.

    - **Parameters**

      **offset**

  - **move\_to\_group(group: GroupMixin) -\> Self**

    Moves the layer to the given group, updates the tree metadata as needed.

    - **Parameters**

      **group** -- The group the current layer will be moved into.

  - **move\_up(offset: int = 1) -\> Self**

    Moves the layer up a certain offset within the group the layer is in.

    - **Parameters**

      **offset**

  - **property name: str**

    Layer name. Writable.

    - **Returns**

      *str*

  - **numpy(channel: str \| None = None, real\_mask: bool = True) -\> ndarray \| None**

    Get NumPy array of the layer.

    - **Parameters**

      **channel** -- Which channel to return, can be 'color', 'shape', 'alpha', or 'mask'. Default is 'color+alpha'.

    - **Returns**

      **numpy.ndarray** or None if there is no pixel.

  - **property offset: tuple\[int, int\]**

    (left, top) tuple. Writable.

    - **Returns**

      *tuple*

  - **property opacity: int**

    Opacity of this layer in \[0, 255\] range. Writable.

    - **Returns**

      int

  - **property origination: list\[Origination\]**

    Property for a list of live shapes or a line.

    Some of the vector masks have associated live shape properties, that are Photoshop feature to handle primitive shapes such as a rectangle, an ellipse, or a line. Vector masks without live shape properties are plain path objects.

    See *psd\_tools.api.shape*.

    - **Returns**

      List of *Invalidated*, *Rectangle*, *RoundedRectangle*, *Ellipse*, or *Line*.

  - **property parent: TGroupMixin \| None**

    Parent of this layer.

  - **property right: int**

    Right coordinate.

    - **Returns**

      int

  - **property size: tuple\[int, int\]**

    (width, height) tuple.

    - **Returns**

      *tuple*

  - **property stroke: *Stroke* \| None**

    Property for strokes.

  - **property tagged\_blocks: *TaggedBlocks***

    Layer tagged blocks that is a dict-like container of settings.

    See *psd\_tools.constants.Tag* for available keys.

    - **Returns**

      *TaggedBlocks*.

    Example:

    ```
    from psd_tools.constants import Tag
    metadata = layer.tagged_blocks.get_data(Tag.METADATA_SETTING)
    ```

  - **property top: int**

    Top coordinate. Writable.

    - **Returns**

      int

  - **topil(channel: int \| None = None, apply\_icc: bool = True) -\> Image \| None**

    Get PIL Image of the layer.

    - **Parameters**

      - •

        **channel** -- Which channel to return; e.g., 0 for 'R' channel in RGB image. See *ChannelID*. When *None*, the method returns all the channels supported by PIL modes.

      - •

        **apply\_icc** -- Whether to apply ICC profile conversion to sRGB.

    - **Returns**

      **PIL.Image**, or *None* if the layer has no pixels.

    Example:

    ```
    from psd_tools.constants import ChannelID
    image = layer.topil()
    red = layer.topil(ChannelID.CHANNEL_0)
    alpha = layer.topil(ChannelID.TRANSPARENCY_MASK)
    ```

    **NOTE:**

    Not all of the PSD image modes are supported in **PIL.Image**. For example, 'CMYK' mode cannot include alpha channel in PIL. In this case, topil drops alpha channel.

  - **property vector\_mask: *VectorMask* \| None**

    Returns vector mask associated with this layer.

    - **Returns**

      *VectorMask* or *None*

  - **property visible: bool**

    Layer visibility. Doesn't take group visibility in account. Writable.

    - **Returns**

      *bool*

  - **property width: int**

    Width of the layer.

    - **Returns**

      int

### PatternFill

- **class psd\_tools.api.adjustments.PatternFill(\*args: Any)**

  Pattern fill.

  - **property bbox: tuple\[int, int, int, int\]**

    (left, top, right, bottom) tuple.

  - **property blend\_mode: *BlendMode***

    Blend mode of this layer. Writable.

    Example:

    ```
    from psd_tools.constants import BlendMode
    if layer.blend_mode == BlendMode.NORMAL:
        layer.blend_mode = BlendMode.SCREEN
    ```

    - **Returns**

      *BlendMode*.

  - **property bottom: int**

    Bottom coordinate.

    - **Returns**

      int

  - **property clip\_layers: list\[Self\]**

    Clip layers associated with this layer.

    - **Returns**

      list of layers

  - **property clipping\_layer: bool**

    Clipping flag for this layer. Writable.

    - **Returns**

      *bool*

  - **composite(viewport: tuple\[int, int, int, int\] \| None = None, force: bool = False, color: float \| tuple\[float, ...\] \| ndarray = 1.0, alpha: float \| ndarray = 0.0, layer\_filter: Callable \| None = None, apply\_icc: bool = True) -\> Image \| None**

    Composite layer and masks (mask, vector mask, and clipping layers).

    - **Parameters**

      - •

        **viewport** -- Viewport bounding box specified by (x1, y1, x2, y2) tuple. Default is the layer's bbox.

      - •

        **force** -- Boolean flag to force vector drawing.

      - •

        **color** -- Backdrop color specified by scalar or tuple of scalar. The color value should be in \[0.0, 1.0\]. For example, (1., 0., 0.) specifies red in RGB color mode.

      - •

        **alpha** -- Backdrop alpha in \[0.0, 1.0\].

      - •

        **layer\_filter** -- Callable that takes a layer as argument and returns whether if the layer is composited. Default is *is\_visible()*.

    - **Returns**

      **PIL.Image** or *None*.

  - **property data: DescriptorBlock**

    Pattern in Descriptor(PATTERN).

  - **delete\_layer() -\> Self**

    Deletes the layer and all its child layers if the layer is a group from its parent (group or psdimage).

  - **property effects: *Effects***

    Layer effects.

    - **Returns**

      *Effects*

  - **has\_clip\_layers() -\> bool**

    Returns True if the layer has associated clipping.

    - **Returns**

      *bool*

  - **has\_effects() -\> bool**

    Returns True if the layer has effects.

    - **Returns**

      *bool*

  - **has\_mask() -\> bool**

    Returns True if the layer has a mask.

    - **Returns**

      *bool*

  - **has\_origination() -\> bool**

    Returns True if the layer has live shape properties.

    - **Returns**

      *bool*

  - **has\_pixels() -\> bool**

    Returns True if the layer has associated pixels. When this is True, *topil* method returns **PIL.Image**.

    - **Returns**

      *bool*

  - **has\_stroke() -\> bool**

    Returns True if the shape has a stroke.

  - **has\_vector\_mask() -\> bool**

    Returns True if the layer has a vector mask.

    - **Returns**

      *bool*

  - **property height: int**

    Height of the layer.

    - **Returns**

      int

  - **is\_group() -\> bool**

    Return True if the layer is a group.

    - **Returns**

      *bool*

  - **is\_visible() -\> bool**

    Layer visibility. Takes group visibility in account.

    - **Returns**

      *bool*

  - **property kind: str**

    Kind of this layer, such as group, pixel, shape, type, smartobject, or psdimage. Class name without *layer* suffix.

    - **Returns**

      *str*

  - **property layer\_id: int**

    Layer ID.

    - **Returns**

      int layer id. if the layer is not assigned an id, -1.

  - **property left: int**

    Left coordinate. Writable.

    - **Returns**

      int

  - **lock(lock\_flags: int = ProtectedFlags.COMPLETE) -\> None**

    Locks a layer accordind to the combination of flags.

    - **Parameters**

      **lockflags** -- An integer representing the locking state

    Example using the constants of ProtectedFlags and bitwise or operation to lock both pixels and positions:

    ```
    layer.lock(ProtectedFlags.COMPOSITE | ProtectedFlags.POSITION)
    ```

  - **property mask: *Mask* \| None**

    Returns mask associated with this layer.

    - **Returns**

      *Mask* or *None*

  - **move\_down(offset: int = 1) -\> Self**

    Moves the layer down a certain offset within the group the layer is in.

    - **Parameters**

      **offset**

  - **move\_to\_group(group: GroupMixin) -\> Self**

    Moves the layer to the given group, updates the tree metadata as needed.

    - **Parameters**

      **group** -- The group the current layer will be moved into.

  - **move\_up(offset: int = 1) -\> Self**

    Moves the layer up a certain offset within the group the layer is in.

    - **Parameters**

      **offset**

  - **property name: str**

    Layer name. Writable.

    - **Returns**

      *str*

  - **numpy(channel: str \| None = None, real\_mask: bool = True) -\> ndarray \| None**

    Get NumPy array of the layer.

    - **Parameters**

      **channel** -- Which channel to return, can be 'color', 'shape', 'alpha', or 'mask'. Default is 'color+alpha'.

    - **Returns**

      **numpy.ndarray** or None if there is no pixel.

  - **property offset: tuple\[int, int\]**

    (left, top) tuple. Writable.

    - **Returns**

      *tuple*

  - **property opacity: int**

    Opacity of this layer in \[0, 255\] range. Writable.

    - **Returns**

      int

  - **property origination: list\[Origination\]**

    Property for a list of live shapes or a line.

    Some of the vector masks have associated live shape properties, that are Photoshop feature to handle primitive shapes such as a rectangle, an ellipse, or a line. Vector masks without live shape properties are plain path objects.

    See *psd\_tools.api.shape*.

    - **Returns**

      List of *Invalidated*, *Rectangle*, *RoundedRectangle*, *Ellipse*, or *Line*.

  - **property parent: TGroupMixin \| None**

    Parent of this layer.

  - **property right: int**

    Right coordinate.

    - **Returns**

      int

  - **property size: tuple\[int, int\]**

    (width, height) tuple.

    - **Returns**

      *tuple*

  - **property stroke: *Stroke* \| None**

    Property for strokes.

  - **property tagged\_blocks: *TaggedBlocks***

    Layer tagged blocks that is a dict-like container of settings.

    See *psd\_tools.constants.Tag* for available keys.

    - **Returns**

      *TaggedBlocks*.

    Example:

    ```
    from psd_tools.constants import Tag
    metadata = layer.tagged_blocks.get_data(Tag.METADATA_SETTING)
    ```

  - **property top: int**

    Top coordinate. Writable.

    - **Returns**

      int

  - **topil(channel: int \| None = None, apply\_icc: bool = True) -\> Image \| None**

    Get PIL Image of the layer.

    - **Parameters**

      - •

        **channel** -- Which channel to return; e.g., 0 for 'R' channel in RGB image. See *ChannelID*. When *None*, the method returns all the channels supported by PIL modes.

      - •

        **apply\_icc** -- Whether to apply ICC profile conversion to sRGB.

    - **Returns**

      **PIL.Image**, or *None* if the layer has no pixels.

    Example:

    ```
    from psd_tools.constants import ChannelID
    image = layer.topil()
    red = layer.topil(ChannelID.CHANNEL_0)
    alpha = layer.topil(ChannelID.TRANSPARENCY_MASK)
    ```

    **NOTE:**

    Not all of the PSD image modes are supported in **PIL.Image**. For example, 'CMYK' mode cannot include alpha channel in PIL. In this case, topil drops alpha channel.

  - **property vector\_mask: *VectorMask* \| None**

    Returns vector mask associated with this layer.

    - **Returns**

      *VectorMask* or *None*

  - **property visible: bool**

    Layer visibility. Doesn't take group visibility in account. Writable.

    - **Returns**

      *bool*

  - **property width: int**

    Width of the layer.

    - **Returns**

      int

### GradientFill

- **class psd\_tools.api.adjustments.GradientFill(\*args: Any)**

  Gradient fill.

  - **property bbox: tuple\[int, int, int, int\]**

    (left, top, right, bottom) tuple.

  - **property blend\_mode: *BlendMode***

    Blend mode of this layer. Writable.

    Example:

    ```
    from psd_tools.constants import BlendMode
    if layer.blend_mode == BlendMode.NORMAL:
        layer.blend_mode = BlendMode.SCREEN
    ```

    - **Returns**

      *BlendMode*.

  - **property bottom: int**

    Bottom coordinate.

    - **Returns**

      int

  - **property clip\_layers: list\[Self\]**

    Clip layers associated with this layer.

    - **Returns**

      list of layers

  - **property clipping\_layer: bool**

    Clipping flag for this layer. Writable.

    - **Returns**

      *bool*

  - **composite(viewport: tuple\[int, int, int, int\] \| None = None, force: bool = False, color: float \| tuple\[float, ...\] \| ndarray = 1.0, alpha: float \| ndarray = 0.0, layer\_filter: Callable \| None = None, apply\_icc: bool = True) -\> Image \| None**

    Composite layer and masks (mask, vector mask, and clipping layers).

    - **Parameters**

      - •

        **viewport** -- Viewport bounding box specified by (x1, y1, x2, y2) tuple. Default is the layer's bbox.

      - •

        **force** -- Boolean flag to force vector drawing.

      - •

        **color** -- Backdrop color specified by scalar or tuple of scalar. The color value should be in \[0.0, 1.0\]. For example, (1., 0., 0.) specifies red in RGB color mode.

      - •

        **alpha** -- Backdrop alpha in \[0.0, 1.0\].

      - •

        **layer\_filter** -- Callable that takes a layer as argument and returns whether if the layer is composited. Default is *is\_visible()*.

    - **Returns**

      **PIL.Image** or *None*.

  - **property data: DescriptorBlock**

    Gradient in Descriptor(GRADIENT).

  - **delete\_layer() -\> Self**

    Deletes the layer and all its child layers if the layer is a group from its parent (group or psdimage).

  - **property effects: *Effects***

    Layer effects.

    - **Returns**

      *Effects*

  - **property gradient\_kind: str**

    Kind of the gradient, one of the following:

    - •

      *Linear*

    - •

      *Radial*

    - •

      *Angle*

    - •

      *Reflected*

    - •

      *Diamond*

  - **has\_clip\_layers() -\> bool**

    Returns True if the layer has associated clipping.

    - **Returns**

      *bool*

  - **has\_effects() -\> bool**

    Returns True if the layer has effects.

    - **Returns**

      *bool*

  - **has\_mask() -\> bool**

    Returns True if the layer has a mask.

    - **Returns**

      *bool*

  - **has\_origination() -\> bool**

    Returns True if the layer has live shape properties.

    - **Returns**

      *bool*

  - **has\_pixels() -\> bool**

    Returns True if the layer has associated pixels. When this is True, *topil* method returns **PIL.Image**.

    - **Returns**

      *bool*

  - **has\_stroke() -\> bool**

    Returns True if the shape has a stroke.

  - **has\_vector\_mask() -\> bool**

    Returns True if the layer has a vector mask.

    - **Returns**

      *bool*

  - **property height: int**

    Height of the layer.

    - **Returns**

      int

  - **is\_group() -\> bool**

    Return True if the layer is a group.

    - **Returns**

      *bool*

  - **is\_visible() -\> bool**

    Layer visibility. Takes group visibility in account.

    - **Returns**

      *bool*

  - **property kind: str**

    Kind of this layer, such as group, pixel, shape, type, smartobject, or psdimage. Class name without *layer* suffix.

    - **Returns**

      *str*

  - **property layer\_id: int**

    Layer ID.

    - **Returns**

      int layer id. if the layer is not assigned an id, -1.

  - **property left: int**

    Left coordinate. Writable.

    - **Returns**

      int

  - **lock(lock\_flags: int = ProtectedFlags.COMPLETE) -\> None**

    Locks a layer accordind to the combination of flags.

    - **Parameters**

      **lockflags** -- An integer representing the locking state

    Example using the constants of ProtectedFlags and bitwise or operation to lock both pixels and positions:

    ```
    layer.lock(ProtectedFlags.COMPOSITE | ProtectedFlags.POSITION)
    ```

  - **property mask: *Mask* \| None**

    Returns mask associated with this layer.

    - **Returns**

      *Mask* or *None*

  - **move\_down(offset: int = 1) -\> Self**

    Moves the layer down a certain offset within the group the layer is in.

    - **Parameters**

      **offset**

  - **move\_to\_group(group: GroupMixin) -\> Self**

    Moves the layer to the given group, updates the tree metadata as needed.

    - **Parameters**

      **group** -- The group the current layer will be moved into.

  - **move\_up(offset: int = 1) -\> Self**

    Moves the layer up a certain offset within the group the layer is in.

    - **Parameters**

      **offset**

  - **property name: str**

    Layer name. Writable.

    - **Returns**

      *str*

  - **numpy(channel: str \| None = None, real\_mask: bool = True) -\> ndarray \| None**

    Get NumPy array of the layer.

    - **Parameters**

      **channel** -- Which channel to return, can be 'color', 'shape', 'alpha', or 'mask'. Default is 'color+alpha'.

    - **Returns**

      **numpy.ndarray** or None if there is no pixel.

  - **property offset: tuple\[int, int\]**

    (left, top) tuple. Writable.

    - **Returns**

      *tuple*

  - **property opacity: int**

    Opacity of this layer in \[0, 255\] range. Writable.

    - **Returns**

      int

  - **property origination: list\[Origination\]**

    Property for a list of live shapes or a line.

    Some of the vector masks have associated live shape properties, that are Photoshop feature to handle primitive shapes such as a rectangle, an ellipse, or a line. Vector masks without live shape properties are plain path objects.

    See *psd\_tools.api.shape*.

    - **Returns**

      List of *Invalidated*, *Rectangle*, *RoundedRectangle*, *Ellipse*, or *Line*.

  - **property parent: TGroupMixin \| None**

    Parent of this layer.

  - **property right: int**

    Right coordinate.

    - **Returns**

      int

  - **property size: tuple\[int, int\]**

    (width, height) tuple.

    - **Returns**

      *tuple*

  - **property stroke: *Stroke* \| None**

    Property for strokes.

  - **property tagged\_blocks: *TaggedBlocks***

    Layer tagged blocks that is a dict-like container of settings.

    See *psd\_tools.constants.Tag* for available keys.

    - **Returns**

      *TaggedBlocks*.

    Example:

    ```
    from psd_tools.constants import Tag
    metadata = layer.tagged_blocks.get_data(Tag.METADATA_SETTING)
    ```

  - **property top: int**

    Top coordinate. Writable.

    - **Returns**

      int

  - **topil(channel: int \| None = None, apply\_icc: bool = True) -\> Image \| None**

    Get PIL Image of the layer.

    - **Parameters**

      - •

        **channel** -- Which channel to return; e.g., 0 for 'R' channel in RGB image. See *ChannelID*. When *None*, the method returns all the channels supported by PIL modes.

      - •

        **apply\_icc** -- Whether to apply ICC profile conversion to sRGB.

    - **Returns**

      **PIL.Image**, or *None* if the layer has no pixels.

    Example:

    ```
    from psd_tools.constants import ChannelID
    image = layer.topil()
    red = layer.topil(ChannelID.CHANNEL_0)
    alpha = layer.topil(ChannelID.TRANSPARENCY_MASK)
    ```

    **NOTE:**

    Not all of the PSD image modes are supported in **PIL.Image**. For example, 'CMYK' mode cannot include alpha channel in PIL. In this case, topil drops alpha channel.

  - **property vector\_mask: *VectorMask* \| None**

    Returns vector mask associated with this layer.

    - **Returns**

      *VectorMask* or *None*

  - **property visible: bool**

    Layer visibility. Doesn't take group visibility in account. Writable.

    - **Returns**

      *bool*

  - **property width: int**

    Width of the layer.

    - **Returns**

      int

### Adjustment layers

Adjustment layers apply image filtering to the composed result. All adjustment layers inherit from **AdjustmentLayer**. Adjustment layers do not have pixels, and currently ignored in *compose*. Attempts to call *topil* on adjustment layers always return *None*.

Just as any other layer, adjustment layers might have an associated mask or vector mask. Adjustment can appear in other layers' clipping layers.

Example:

```
if isinstance(layer, psd_tools.layers.AdjustmentLayer):
    print(layer.kind)
```

### BrightnessContrast

- **class psd\_tools.api.adjustments.BrightnessContrast(\*args: Any)**

  Brightness and contrast adjustment.

  - **property automatic: bool**

    - **property brightness: int**

    - **property contrast: int**

    - **property lab: bool**

    - **property mean: int**

    - **property use\_legacy: bool**

    - **property vrsn: int**

    ### Curves

- **class psd\_tools.api.adjustments.Curves(\*args: Any)**

  Curves adjustment.

  - **property data: *Curves***

    Raw data.

    - **Returns**

      **Curves**

  - **property extra**

    ### Exposure

- **class psd\_tools.api.adjustments.Exposure(\*args: Any)**

  Exposure adjustment.

  - **property exposure: float**

    Exposure.

    - **Returns**

      *float*

  - **property gamma: float**

    Gamma.

    - **Returns**

      *float*

  - **property offset: float**

    Offset.

    - **Returns**

      *float*

### Levels

- **class psd\_tools.api.adjustments.Levels(\*args: Any)**

  Levels adjustment.

  Levels contain a list of **LevelRecord**.

  - **property data: *Levels***

    List of level records. The first record is the master.

    - **Returns**

      **Levels**.

  - **property master: LevelRecord**

    Master record.

### Vibrance

- **class psd\_tools.api.adjustments.Vibrance(\*args: Any)**

  Vibrance adjustment.

  - **property saturation: int**

    Saturation.

    - **Returns**

      *int*

  - **property vibrance: int**

    Vibrance.

    - **Returns**

      *int*

### HueSaturation

- **class psd\_tools.api.adjustments.HueSaturation(\*args: Any)**

  Hue/Saturation adjustment.

  HueSaturation contains a list of data.

  - **property colorization: tuple**

    Colorization.

    - **Returns**

      *tuple*

  - **property data: list**

    List of Hue/Saturation records.

    - **Returns**

      *list*

  - **property enable\_colorization: int**

    Enable colorization.

    - **Returns**

      *int*

  - **property master: tuple**

    Master record.

    - **Returns**

      *tuple*

### ColorBalance

- **class psd\_tools.api.adjustments.ColorBalance(\*args: Any)**

  Color balance adjustment.

  - **property highlights: tuple**

    Highlights.

    - **Returns**

      *tuple*

  - **property luminosity: int**

    Luminosity.

    - **Returns**

      *int*

  - **property midtones: tuple**

    Mid-tones.

    - **Returns**

      *tuple*

  - **property shadows: tuple**

    Shadows.

    - **Returns**

      *tuple*

### BlackAndWhite

- **class psd\_tools.api.adjustments.BlackAndWhite(\*args: Any)**

  Black and white adjustment.

  - **property blue: int**

    - **property cyan: int**

    - **property green: int**

    - **property magenta: int**

    - **property preset\_file\_name: str**

    - **property preset\_kind: int**

    - **property red: int**

    - **property tint\_color**

    - **property use\_tint: bool**

    - **property yellow: int**

    ### PhotoFilter

- **class psd\_tools.api.adjustments.PhotoFilter(\*args: Any)**

  Photo filter adjustment.

  - **property color\_components**

    - **property color\_space**

    - **property density**

    - **property luminosity**

    - **property xyz: bool**

    xyz.

    - **Returns**

      *bool*

### ChannelMixer

- **class psd\_tools.api.adjustments.ChannelMixer(\*args: Any)**

  Channel mixer adjustment.

  - **property data**

    - **property monochrome**

    ### ColorLookup

- **class psd\_tools.api.adjustments.ColorLookup(\*args: Any)**

  Color lookup adjustment.

### Posterize

- **class psd\_tools.api.adjustments.Posterize(\*args: Any)**

  Posterize adjustment.

  - **property posterize: int**

    Posterize value.

    - **Returns**

      *int*

### Threshold

- **class psd\_tools.api.adjustments.Threshold(\*args: Any)**

  Threshold adjustment.

  - **property threshold: int**

    Threshold value.

    - **Returns**

      *int*

### SelectiveColor

- **class psd\_tools.api.adjustments.SelectiveColor(\*args: Any)**

  Selective color adjustment.

  - **property data**

    - **property method**

    ### GradientMap

- **class psd\_tools.api.adjustments.GradientMap(\*args: Any)**

  Gradient map adjustment.

  - **property color\_model**

    - **property color\_stops**

    - **property dithered**

    - **property expansion**

    - **property gradient\_name**

    - **property interpolation: float**

    Interpolation between 0.0 and 1.0.

  - **property length**

    - **property max\_color**

    - **property min\_color**

    - **property mode**

    - **property random\_seed**

    - **property reversed**

    - **property roughness**

    - **property show\_transparency**

    - **property transparency\_stops**

    - **property use\_vector\_color**

    ### psd\_tools.api.effects

Effects module.

- **class psd\_tools.api.effects.Effects(layer: Any)**

  List-like effects.

  - **property enabled: bool**

    Whether if all the effects are enabled.

    - **Return type**

      bool

  - **find(name: str) -\> Iterator\[\_Effect\]**

    Iterate effect items by name.

  - **property scale**

    Scale value.

### DropShadow

- **class psd\_tools.api.effects.DropShadow(value: *Descriptor*, image\_resources: *ImageResources*)**

  - **property angle**

    Angle value.

  - **property anti\_aliased: bool**

    Angi-aliased.

  - **property blend\_mode**

    Effect blending mode.

  - **property choke**

    Choke level.

  - **property color**

    Color.

  - **property contour**

    Contour configuration.

  - **property distance**

    Distance.

  - **property enabled: bool**

    Whether if the effect is enabled.

  - **property layer\_knocks\_out: bool**

    Layers are knocking out.

  - **property noise**

    Noise level.

  - **property opacity: float**

    Layer effect opacity in percentage.

  - **property present: bool**

    Whether if the effect is present in Photoshop UI.

  - **property shown: bool**

    Whether if the effect is shown in dialog.

  - **property size**

    Size in pixels.

  - **property use\_global\_light: bool**

    Using global light.

### InnerShadow

- **class psd\_tools.api.effects.InnerShadow(value: *Descriptor*, image\_resources: *ImageResources*)**

  - **property angle**

    Angle value.

  - **property anti\_aliased: bool**

    Angi-aliased.

  - **property blend\_mode**

    Effect blending mode.

  - **property choke**

    Choke level.

  - **property color**

    Color.

  - **property contour**

    Contour configuration.

  - **property distance**

    Distance.

  - **property enabled: bool**

    Whether if the effect is enabled.

  - **property noise**

    Noise level.

  - **property opacity: float**

    Layer effect opacity in percentage.

  - **property present: bool**

    Whether if the effect is present in Photoshop UI.

  - **property shown: bool**

    Whether if the effect is shown in dialog.

  - **property size**

    Size in pixels.

  - **property use\_global\_light: bool**

    Using global light.

### OuterGlow

- **class psd\_tools.api.effects.OuterGlow(value: *Descriptor*, image\_resources: *ImageResources*)**

  - **property angle**

    Angle value.

  - **property anti\_aliased: bool**

    Angi-aliased.

  - **property blend\_mode**

    Effect blending mode.

  - **property choke**

    Choke level.

  - **property color**

    Color.

  - **property contour**

    Contour configuration.

  - **property dithered**

    Dither flag.

  - **property enabled: bool**

    Whether if the effect is enabled.

  - **property glow\_type**

    Glow type.

  - **property gradient**

    Gradient configuration.

  - **property noise**

    Noise level.

  - **property offset**

    Offset value.

  - **property opacity: float**

    Layer effect opacity in percentage.

  - **property present: bool**

    Whether if the effect is present in Photoshop UI.

  - **property quality\_jitter**

    Quality jitter

  - **property quality\_range**

    Quality range.

  - **property reversed**

    Reverse flag.

  - **property shown: bool**

    Whether if the effect is shown in dialog.

  - **property size**

    Size in pixels.

  - **property type**

    Gradient type, one of *linear*, *radial*, *angle*, *reflected*, or *diamond*.

### InnerGlow

- **class psd\_tools.api.effects.InnerGlow(value: *Descriptor*, image\_resources: *ImageResources*)**

  - **property angle**

    Angle value.

  - **property anti\_aliased: bool**

    Angi-aliased.

  - **property blend\_mode**

    Effect blending mode.

  - **property choke**

    Choke level.

  - **property color**

    Color.

  - **property contour**

    Contour configuration.

  - **property dithered**

    Dither flag.

  - **property enabled: bool**

    Whether if the effect is enabled.

  - **property glow\_source**

    Elements source.

  - **property glow\_type**

    Glow type.

  - **property gradient**

    Gradient configuration.

  - **property noise**

    Noise level.

  - **property offset**

    Offset value.

  - **property opacity: float**

    Layer effect opacity in percentage.

  - **property present: bool**

    Whether if the effect is present in Photoshop UI.

  - **property quality\_jitter**

    Quality jitter

  - **property quality\_range**

    Quality range.

  - **property reversed**

    Reverse flag.

  - **property shown: bool**

    Whether if the effect is shown in dialog.

  - **property size**

    Size in pixels.

  - **property type**

    Gradient type, one of *linear*, *radial*, *angle*, *reflected*, or *diamond*.

### ColorOverlay

- **class psd\_tools.api.effects.ColorOverlay(value: *Descriptor*, image\_resources: *ImageResources*)**

  - **property blend\_mode**

    Effect blending mode.

  - **property color**

    Color.

  - **property enabled: bool**

    Whether if the effect is enabled.

  - **property opacity: float**

    Layer effect opacity in percentage.

  - **property present: bool**

    Whether if the effect is present in Photoshop UI.

  - **property shown: bool**

    Whether if the effect is shown in dialog.

### GradientOverlay

- **class psd\_tools.api.effects.GradientOverlay(value: *Descriptor*, image\_resources: *ImageResources*)**

  - **property aligned: bool**

    Aligned.

  - **property angle**

    Angle value.

  - **property blend\_mode**

    Effect blending mode.

  - **property dithered**

    Dither flag.

  - **property enabled: bool**

    Whether if the effect is enabled.

  - **property gradient**

    Gradient configuration.

  - **property offset**

    Offset value.

  - **property opacity: float**

    Layer effect opacity in percentage.

  - **property present: bool**

    Whether if the effect is present in Photoshop UI.

  - **property reversed**

    Reverse flag.

  - **property scale**

    Scale value.

  - **property shown: bool**

    Whether if the effect is shown in dialog.

  - **property type**

    Gradient type, one of *linear*, *radial*, *angle*, *reflected*, or *diamond*.

### PatternOverlay

- **class psd\_tools.api.effects.PatternOverlay(value: *Descriptor*, image\_resources: *ImageResources*)**

  - **property aligned: bool**

    Aligned.

  - **property angle**

    Angle value.

  - **property blend\_mode**

    Effect blending mode.

  - **property enabled: bool**

    Whether if the effect is enabled.

  - **property linked**

    Linked.

  - **property opacity: float**

    Layer effect opacity in percentage.

  - **property pattern**

    Pattern config.

  - **property phase**

    Phase value in Point.

  - **property present: bool**

    Whether if the effect is present in Photoshop UI.

  - **property scale**

    Scale value.

  - **property shown: bool**

    Whether if the effect is shown in dialog.

### Stroke

- **class psd\_tools.api.effects.Stroke(value: *Descriptor*, image\_resources: *ImageResources*)**

  - **property angle**

    Angle value.

  - **property blend\_mode**

    Effect blending mode.

  - **property color**

    Color.

  - **property dithered**

    Dither flag.

  - **property enabled: bool**

    Whether if the effect is enabled.

  - **property fill\_type**

    Fill type, SolidColor, Gradient, or Pattern.

  - **property gradient**

    Gradient configuration.

  - **property linked**

    Linked.

  - **property offset**

    Offset value.

  - **property opacity: float**

    Layer effect opacity in percentage.

  - **property overprint**

    Overprint flag.

  - **property pattern**

    Pattern config.

  - **property phase**

    Phase value in Point.

  - **property position**

    Position of the stroke, InsetFrame, OutsetFrame, or CenteredFrame.

  - **property present: bool**

    Whether if the effect is present in Photoshop UI.

  - **property reversed**

    Reverse flag.

  - **property shown: bool**

    Whether if the effect is shown in dialog.

  - **property size**

    Size value.

  - **property type**

    Gradient type, one of *linear*, *radial*, *angle*, *reflected*, or *diamond*.

### BevelEmboss

- **class psd\_tools.api.effects.BevelEmboss(value: *Descriptor*, image\_resources: *ImageResources*)**

  - **property altitude**

    Altitude value.

  - **property angle**

    Angle value.

  - **property anti\_aliased: bool**

    Anti-aliased.

  - **property bevel\_style**

    Bevel style, one of *OuterBevel*, *InnerBevel*, *Emboss*, *PillowEmboss*, or *StrokeEmboss*.

  - **property bevel\_type**

    Bevel type, one of *SoftMatte*, *HardLight*, *SoftLight*.

  - **property contour**

    Contour configuration.

  - **property depth**

    Depth value.

  - **property direction**

    Direction, either *StampIn* or *StampOut*.

  - **property enabled: bool**

    Whether if the effect is enabled.

  - **property highlight\_color**

    Highlight color value.

  - **property highlight\_mode**

    Highlight blending mode.

  - **property highlight\_opacity**

    Highlight opacity value.

  - **property opacity: float**

    Layer effect opacity in percentage.

  - **property present: bool**

    Whether if the effect is present in Photoshop UI.

  - **property shadow\_color**

    Shadow color value.

  - **property shadow\_mode**

    Shadow blending mode.

  - **property shadow\_opacity**

    Shadow opacity value.

  - **property shown: bool**

    Whether if the effect is shown in dialog.

  - **property size**

    Size value in pixel.

  - **property soften**

    Soften value.

  - **property use\_global\_light: bool**

    Using global light.

  - **property use\_shape: bool**

    Using shape.

  - **property use\_texture: bool**

    Using texture.

### Satin

- **class psd\_tools.api.effects.Satin(value: *Descriptor*, image\_resources: *ImageResources*)**

  Satin effect

  - **property angle**

    Angle value.

  - **property anti\_aliased: bool**

    Anti-aliased.

  - **property blend\_mode**

    Effect blending mode.

  - **property color**

    Color.

  - **property contour**

    Contour configuration.

  - **property distance**

    Distance value.

  - **property enabled: bool**

    Whether if the effect is enabled.

  - **property inverted: bool**

    Inverted.

  - **property opacity: float**

    Layer effect opacity in percentage.

  - **property present: bool**

    Whether if the effect is present in Photoshop UI.

  - **property shown: bool**

    Whether if the effect is shown in dialog.

  - **property size**

    Size value in pixel.

### psd\_tools.api.layers

Layer module.

### Artboard

- **class psd\_tools.api.layers.Artboard(psd: Any, record: *LayerRecord*, channels: *ChannelDataList*, parent: TGroupMixin \| None)**

  Artboard is a special kind of group that has a pre-defined viewbox.

  - **append(layer: Layer) -\> None**

    Add a layer to the end (top) of the group

    - **Parameters**

      **layer** -- The layer to add

  - **property bbox: tuple\[int, int, int, int\]**

    (left, top, right, bottom) tuple.

  - **property blend\_mode: *BlendMode***

    Blend mode of this layer. Writable.

    Example:

    ```
    from psd_tools.constants import BlendMode
    if layer.blend_mode == BlendMode.NORMAL:
        layer.blend_mode = BlendMode.SCREEN
    ```

    - **Returns**

      *BlendMode*.

  - **property bottom: int**

    Bottom coordinate.

    - **Returns**

      int

  - **clear() -\> None**

    Clears the group.

  - **property clip\_layers: list\[Self\]**

    Clip layers associated with this layer.

    - **Returns**

      list of layers

  - **property clipping\_layer: bool**

    Clipping flag for this layer. Writable.

    - **Returns**

      *bool*

  - **composite(viewport: tuple\[int, int, int, int\] \| None = None, force: bool = False, color: float \| tuple\[float, ...\] \| ndarray = 1.0, alpha: float \| ndarray = 0.0, layer\_filter: Callable \| None = None, apply\_icc: bool = True)**

    Composite layer and masks (mask, vector mask, and clipping layers).

    - **Parameters**

      - •

        **viewport** -- Viewport bounding box specified by (x1, y1, x2, y2) tuple. Default is the layer's bbox.

      - •

        **force** -- Boolean flag to force vector drawing.

      - •

        **color** -- Backdrop color specified by scalar or tuple of scalar. The color value should be in \[0.0, 1.0\]. For example, (1., 0., 0.) specifies red in RGB color mode.

      - •

        **alpha** -- Backdrop alpha in \[0.0, 1.0\].

      - •

        **layer\_filter** -- Callable that takes a layer as argument and returns whether if the layer is composited. Default is *is\_visible()*.

    - **Returns**

      **PIL.Image**.

  - **count(layer: Layer) -\> int**

    Counts the number of occurences of a layer in the group.

    - **Parameters**

      **layer**

  - **delete\_layer() -\> Self**

    Deletes the layer and all its child layers if the layer is a group from its parent (group or psdimage).

  - **descendants(include\_clip: bool = True) -\> Iterator\[Layer\]**

    Return a generator to iterate over all descendant layers.

    Example:

    ```
    # Iterate over all layers
    for layer in psd.descendants():
        print(layer)
    # Iterate over all layers in reverse order
    for layer in reversed(list(psd.descendants())):
        print(layer)
    ```

    - **Parameters**

      **include\_clip** -- include clipping layers.

  - **property effects: *Effects***

    Layer effects.

    - **Returns**

      *Effects*

  - **extend(layers: Iterable\[Layer\]) -\> None**

    Add a list of layers to the end (top) of the group

    - **Parameters**

      **layers** -- The layers to add

  - **static extract\_bbox(layers, include\_invisible: bool = False) -\> tuple\[int, int, int, int\]**

    Returns a bounding box for **layers** or (0, 0, 0, 0) if the layers have no bounding box.

    - **Parameters**

      **include\_invisible** -- include invisible layers in calculation.

    - **Returns**

      tuple of four int

  - **find(name: str) -\> Layer \| None**

    Returns the first layer found for the given layer name

    - **Parameters**

      **name**

  - **findall(name: str) -\> Iterator\[Layer\]**

    Return a generator to iterate over all layers with the given name.

    - **Parameters**

      **name**

  - **classmethod group\_layers(layers: list\[Layer\], name: str = 'Group', parent: GroupMixin \| None = None, open\_folder: bool = True)**

    Create a new Group object containing the given layers and moved into the parent folder.

    If no parent is provided, the group will be put in place of the first layer in the given list. Example below:

    - **Parameters**

      - •

        **layers** -- The layers to group. Can by any subclass of **Layer**

      - •

        **name** -- The display name of the group. Default to "Group".

      - •

        **parent** -- The parent group to add the newly created Group object into.

      - •

        **open\_folder** -- Boolean defining whether the folder will be open or closed in photoshop. Default to True.

    - **Returns**

      A *Group*

  - **has\_clip\_layers() -\> bool**

    Returns True if the layer has associated clipping.

    - **Returns**

      *bool*

  - **has\_effects() -\> bool**

    Returns True if the layer has effects.

    - **Returns**

      *bool*

  - **has\_mask() -\> bool**

    Returns True if the layer has a mask.

    - **Returns**

      *bool*

  - **has\_origination() -\> bool**

    Returns True if the layer has live shape properties.

    - **Returns**

      *bool*

  - **has\_pixels() -\> bool**

    Returns True if the layer has associated pixels. When this is True, *topil* method returns **PIL.Image**.

    - **Returns**

      *bool*

  - **has\_stroke() -\> bool**

    Returns True if the shape has a stroke.

  - **has\_vector\_mask() -\> bool**

    Returns True if the layer has a vector mask.

    - **Returns**

      *bool*

  - **property height: int**

    Height of the layer.

    - **Returns**

      int

  - **index(layer: Layer) -\> int**

    Returns the index of the specified layer in the group.

    - **Parameters**

      **layer**

  - **insert(index: int, layer: Layer) -\> None**

    Insert the given layer at the specified index.

    - **Parameters**

      - •

        **index**

      - •

        **layer**

  - **is\_group() -\> bool**

    Return True if the layer is a group.

    - **Returns**

      *bool*

  - **is\_visible() -\> bool**

    Layer visibility. Takes group visibility in account.

    - **Returns**

      *bool*

  - **property kind: str**

    Kind of this layer, such as group, pixel, shape, type, smartobject, or psdimage. Class name without *layer* suffix.

    - **Returns**

      *str*

  - **property layer\_id: int**

    Layer ID.

    - **Returns**

      int layer id. if the layer is not assigned an id, -1.

  - **property left: int**

    Left coordinate. Writable.

    - **Returns**

      int

  - **lock(lock\_flags: int = ProtectedFlags.COMPLETE) -\> None**

    Locks a layer accordind to the combination of flags.

    - **Parameters**

      **lockflags** -- An integer representing the locking state

    Example using the constants of ProtectedFlags and bitwise or operation to lock both pixels and positions:

    ```
    layer.lock(ProtectedFlags.COMPOSITE | ProtectedFlags.POSITION)
    ```

  - **property mask: *Mask* \| None**

    Returns mask associated with this layer.

    - **Returns**

      *Mask* or *None*

  - **move\_down(offset: int = 1) -\> Self**

    Moves the layer down a certain offset within the group the layer is in.

    - **Parameters**

      **offset**

  - **move\_to\_group(group: GroupMixin) -\> Self**

    Moves the layer to the given group, updates the tree metadata as needed.

    - **Parameters**

      **group** -- The group the current layer will be moved into.

  - **move\_up(offset: int = 1) -\> Self**

    Moves the layer up a certain offset within the group the layer is in.

    - **Parameters**

      **offset**

  - **property name: str**

    Layer name. Writable.

    - **Returns**

      *str*

  - **classmethod new(name: str = 'Group', open\_folder: bool = True, parent: GroupMixin \| None = None) -\> Self**

    Create a new Group object with minimal records and data channels and metadata to properly include the group in the PSD file.

    - **Parameters**

      - •

        **name** -- The display name of the group. Default to "Group".

      - •

        **open\_folder** -- Boolean defining whether the folder will be open or closed in photoshop. Default to True.

      - •

        **parent** -- Optional parent folder to move the newly created group into.

    - **Returns**

      A *Group* object

  - **numpy(channel: str \| None = None, real\_mask: bool = True) -\> ndarray \| None**

    Get NumPy array of the layer.

    - **Parameters**

      **channel** -- Which channel to return, can be 'color', 'shape', 'alpha', or 'mask'. Default is 'color+alpha'.

    - **Returns**

      **numpy.ndarray** or None if there is no pixel.

  - **property offset: tuple\[int, int\]**

    (left, top) tuple. Writable.

    - **Returns**

      *tuple*

  - **property opacity: int**

    Opacity of this layer in \[0, 255\] range. Writable.

    - **Returns**

      int

  - **property origination: list\[Origination\]**

    Property for a list of live shapes or a line.

    Some of the vector masks have associated live shape properties, that are Photoshop feature to handle primitive shapes such as a rectangle, an ellipse, or a line. Vector masks without live shape properties are plain path objects.

    See *psd\_tools.api.shape*.

    - **Returns**

      List of *Invalidated*, *Rectangle*, *RoundedRectangle*, *Ellipse*, or *Line*.

  - **property parent: TGroupMixin \| None**

    Parent of this layer.

  - **pop(index: int = -1) -\> Layer**

    Removes the specified layer from the list and returns it.

    - **Parameters**

      **index**

  - **remove(layer: Layer) -\> Self**

    Removes the specified layer from the group

    - **Parameters**

      **layer**

  - **property right: int**

    Right coordinate.

    - **Returns**

      int

  - **property size: tuple\[int, int\]**

    (width, height) tuple.

    - **Returns**

      *tuple*

  - **property stroke: *Stroke* \| None**

    Property for strokes.

  - **property tagged\_blocks: *TaggedBlocks***

    Layer tagged blocks that is a dict-like container of settings.

    See *psd\_tools.constants.Tag* for available keys.

    - **Returns**

      *TaggedBlocks*.

    Example:

    ```
    from psd_tools.constants import Tag
    metadata = layer.tagged_blocks.get_data(Tag.METADATA_SETTING)
    ```

  - **property top: int**

    Top coordinate. Writable.

    - **Returns**

      int

  - **topil(channel: int \| None = None, apply\_icc: bool = True) -\> Image \| None**

    Get PIL Image of the layer.

    - **Parameters**

      - •

        **channel** -- Which channel to return; e.g., 0 for 'R' channel in RGB image. See *ChannelID*. When *None*, the method returns all the channels supported by PIL modes.

      - •

        **apply\_icc** -- Whether to apply ICC profile conversion to sRGB.

    - **Returns**

      **PIL.Image**, or *None* if the layer has no pixels.

    Example:

    ```
    from psd_tools.constants import ChannelID
    image = layer.topil()
    red = layer.topil(ChannelID.CHANNEL_0)
    alpha = layer.topil(ChannelID.TRANSPARENCY_MASK)
    ```

    **NOTE:**

    Not all of the PSD image modes are supported in **PIL.Image**. For example, 'CMYK' mode cannot include alpha channel in PIL. In this case, topil drops alpha channel.

  - **property vector\_mask: *VectorMask* \| None**

    Returns vector mask associated with this layer.

    - **Returns**

      *VectorMask* or *None*

  - **property visible: bool**

    Layer visibility. Doesn't take group visibility in account. Writable.

    - **Returns**

      *bool*

  - **property width: int**

    Width of the layer.

    - **Returns**

      int

### Group

- **class psd\_tools.api.layers.Group(psd: Any, record: *LayerRecord*, channels: *ChannelDataList*, parent: TGroupMixin \| None)**

  Group of layers.

  Example:

  ```
  group = psd[1]
  for layer in group:
      if layer.kind == 'pixel':
          print(layer.name)
  ```

  - **append(layer: Layer) -\> None**

    Add a layer to the end (top) of the group

    - **Parameters**

      **layer** -- The layer to add

  - **property bbox: tuple\[int, int, int, int\]**

    (left, top, right, bottom) tuple.

  - **property blend\_mode: *BlendMode***

    Blend mode of this layer. Writable.

    Example:

    ```
    from psd_tools.constants import BlendMode
    if layer.blend_mode == BlendMode.NORMAL:
        layer.blend_mode = BlendMode.SCREEN
    ```

    - **Returns**

      *BlendMode*.

  - **property bottom: int**

    Bottom coordinate.

    - **Returns**

      int

  - **clear() -\> None**

    Clears the group.

  - **property clip\_layers: list\[Self\]**

    Clip layers associated with this layer.

    - **Returns**

      list of layers

  - **property clipping\_layer: bool**

    Clipping flag for this layer. Writable.

    - **Returns**

      *bool*

  - **composite(viewport: tuple\[int, int, int, int\] \| None = None, force: bool = False, color: float \| tuple\[float, ...\] \| ndarray = 1.0, alpha: float \| ndarray = 0.0, layer\_filter: Callable \| None = None, apply\_icc: bool = True)**

    Composite layer and masks (mask, vector mask, and clipping layers).

    - **Parameters**

      - •

        **viewport** -- Viewport bounding box specified by (x1, y1, x2, y2) tuple. Default is the layer's bbox.

      - •

        **force** -- Boolean flag to force vector drawing.

      - •

        **color** -- Backdrop color specified by scalar or tuple of scalar. The color value should be in \[0.0, 1.0\]. For example, (1., 0., 0.) specifies red in RGB color mode.

      - •

        **alpha** -- Backdrop alpha in \[0.0, 1.0\].

      - •

        **layer\_filter** -- Callable that takes a layer as argument and returns whether if the layer is composited. Default is *is\_visible()*.

    - **Returns**

      **PIL.Image**.

  - **count(layer: Layer) -\> int**

    Counts the number of occurences of a layer in the group.

    - **Parameters**

      **layer**

  - **delete\_layer() -\> Self**

    Deletes the layer and all its child layers if the layer is a group from its parent (group or psdimage).

  - **descendants(include\_clip: bool = True) -\> Iterator\[Layer\]**

    Return a generator to iterate over all descendant layers.

    Example:

    ```
    # Iterate over all layers
    for layer in psd.descendants():
        print(layer)
    # Iterate over all layers in reverse order
    for layer in reversed(list(psd.descendants())):
        print(layer)
    ```

    - **Parameters**

      **include\_clip** -- include clipping layers.

  - **property effects: *Effects***

    Layer effects.

    - **Returns**

      *Effects*

  - **extend(layers: Iterable\[Layer\]) -\> None**

    Add a list of layers to the end (top) of the group

    - **Parameters**

      **layers** -- The layers to add

  - **static extract\_bbox(layers, include\_invisible: bool = False) -\> tuple\[int, int, int, int\]**

    Returns a bounding box for **layers** or (0, 0, 0, 0) if the layers have no bounding box.

    - **Parameters**

      **include\_invisible** -- include invisible layers in calculation.

    - **Returns**

      tuple of four int

  - **find(name: str) -\> Layer \| None**

    Returns the first layer found for the given layer name

    - **Parameters**

      **name**

  - **findall(name: str) -\> Iterator\[Layer\]**

    Return a generator to iterate over all layers with the given name.

    - **Parameters**

      **name**

  - **classmethod group\_layers(layers: list\[Layer\], name: str = 'Group', parent: GroupMixin \| None = None, open\_folder: bool = True)**

    Create a new Group object containing the given layers and moved into the parent folder.

    If no parent is provided, the group will be put in place of the first layer in the given list. Example below:

    - **Parameters**

      - •

        **layers** -- The layers to group. Can by any subclass of **Layer**

      - •

        **name** -- The display name of the group. Default to "Group".

      - •

        **parent** -- The parent group to add the newly created Group object into.

      - •

        **open\_folder** -- Boolean defining whether the folder will be open or closed in photoshop. Default to True.

    - **Returns**

      A *Group*

  - **has\_clip\_layers() -\> bool**

    Returns True if the layer has associated clipping.

    - **Returns**

      *bool*

  - **has\_effects() -\> bool**

    Returns True if the layer has effects.

    - **Returns**

      *bool*

  - **has\_mask() -\> bool**

    Returns True if the layer has a mask.

    - **Returns**

      *bool*

  - **has\_origination() -\> bool**

    Returns True if the layer has live shape properties.

    - **Returns**

      *bool*

  - **has\_pixels() -\> bool**

    Returns True if the layer has associated pixels. When this is True, *topil* method returns **PIL.Image**.

    - **Returns**

      *bool*

  - **has\_stroke() -\> bool**

    Returns True if the shape has a stroke.

  - **has\_vector\_mask() -\> bool**

    Returns True if the layer has a vector mask.

    - **Returns**

      *bool*

  - **property height: int**

    Height of the layer.

    - **Returns**

      int

  - **index(layer: Layer) -\> int**

    Returns the index of the specified layer in the group.

    - **Parameters**

      **layer**

  - **insert(index: int, layer: Layer) -\> None**

    Insert the given layer at the specified index.

    - **Parameters**

      - •

        **index**

      - •

        **layer**

  - **is\_group() -\> bool**

    Return True if the layer is a group.

    - **Returns**

      *bool*

  - **is\_visible() -\> bool**

    Layer visibility. Takes group visibility in account.

    - **Returns**

      *bool*

  - **property kind: str**

    Kind of this layer, such as group, pixel, shape, type, smartobject, or psdimage. Class name without *layer* suffix.

    - **Returns**

      *str*

  - **property layer\_id: int**

    Layer ID.

    - **Returns**

      int layer id. if the layer is not assigned an id, -1.

  - **property left: int**

    Left coordinate. Writable.

    - **Returns**

      int

  - **lock(lock\_flags: int = ProtectedFlags.COMPLETE) -\> None**

    Locks a layer accordind to the combination of flags.

    - **Parameters**

      **lockflags** -- An integer representing the locking state

    Example using the constants of ProtectedFlags and bitwise or operation to lock both pixels and positions:

    ```
    layer.lock(ProtectedFlags.COMPOSITE | ProtectedFlags.POSITION)
    ```

  - **property mask: *Mask* \| None**

    Returns mask associated with this layer.

    - **Returns**

      *Mask* or *None*

  - **move\_down(offset: int = 1) -\> Self**

    Moves the layer down a certain offset within the group the layer is in.

    - **Parameters**

      **offset**

  - **move\_to\_group(group: GroupMixin) -\> Self**

    Moves the layer to the given group, updates the tree metadata as needed.

    - **Parameters**

      **group** -- The group the current layer will be moved into.

  - **move\_up(offset: int = 1) -\> Self**

    Moves the layer up a certain offset within the group the layer is in.

    - **Parameters**

      **offset**

  - **property name: str**

    Layer name. Writable.

    - **Returns**

      *str*

  - **classmethod new(name: str = 'Group', open\_folder: bool = True, parent: GroupMixin \| None = None) -\> Self**

    Create a new Group object with minimal records and data channels and metadata to properly include the group in the PSD file.

    - **Parameters**

      - •

        **name** -- The display name of the group. Default to "Group".

      - •

        **open\_folder** -- Boolean defining whether the folder will be open or closed in photoshop. Default to True.

      - •

        **parent** -- Optional parent folder to move the newly created group into.

    - **Returns**

      A *Group* object

  - **numpy(channel: str \| None = None, real\_mask: bool = True) -\> ndarray \| None**

    Get NumPy array of the layer.

    - **Parameters**

      **channel** -- Which channel to return, can be 'color', 'shape', 'alpha', or 'mask'. Default is 'color+alpha'.

    - **Returns**

      **numpy.ndarray** or None if there is no pixel.

  - **property offset: tuple\[int, int\]**

    (left, top) tuple. Writable.

    - **Returns**

      *tuple*

  - **property opacity: int**

    Opacity of this layer in \[0, 255\] range. Writable.

    - **Returns**

      int

  - **property origination: list\[Origination\]**

    Property for a list of live shapes or a line.

    Some of the vector masks have associated live shape properties, that are Photoshop feature to handle primitive shapes such as a rectangle, an ellipse, or a line. Vector masks without live shape properties are plain path objects.

    See *psd\_tools.api.shape*.

    - **Returns**

      List of *Invalidated*, *Rectangle*, *RoundedRectangle*, *Ellipse*, or *Line*.

  - **property parent: TGroupMixin \| None**

    Parent of this layer.

  - **pop(index: int = -1) -\> Layer**

    Removes the specified layer from the list and returns it.

    - **Parameters**

      **index**

  - **remove(layer: Layer) -\> Self**

    Removes the specified layer from the group

    - **Parameters**

      **layer**

  - **property right: int**

    Right coordinate.

    - **Returns**

      int

  - **property size: tuple\[int, int\]**

    (width, height) tuple.

    - **Returns**

      *tuple*

  - **property stroke: *Stroke* \| None**

    Property for strokes.

  - **property tagged\_blocks: *TaggedBlocks***

    Layer tagged blocks that is a dict-like container of settings.

    See *psd\_tools.constants.Tag* for available keys.

    - **Returns**

      *TaggedBlocks*.

    Example:

    ```
    from psd_tools.constants import Tag
    metadata = layer.tagged_blocks.get_data(Tag.METADATA_SETTING)
    ```

  - **property top: int**

    Top coordinate. Writable.

    - **Returns**

      int

  - **topil(channel: int \| None = None, apply\_icc: bool = True) -\> Image \| None**

    Get PIL Image of the layer.

    - **Parameters**

      - •

        **channel** -- Which channel to return; e.g., 0 for 'R' channel in RGB image. See *ChannelID*. When *None*, the method returns all the channels supported by PIL modes.

      - •

        **apply\_icc** -- Whether to apply ICC profile conversion to sRGB.

    - **Returns**

      **PIL.Image**, or *None* if the layer has no pixels.

    Example:

    ```
    from psd_tools.constants import ChannelID
    image = layer.topil()
    red = layer.topil(ChannelID.CHANNEL_0)
    alpha = layer.topil(ChannelID.TRANSPARENCY_MASK)
    ```

    **NOTE:**

    Not all of the PSD image modes are supported in **PIL.Image**. For example, 'CMYK' mode cannot include alpha channel in PIL. In this case, topil drops alpha channel.

  - **property vector\_mask: *VectorMask* \| None**

    Returns vector mask associated with this layer.

    - **Returns**

      *VectorMask* or *None*

  - **property visible: bool**

    Layer visibility. Doesn't take group visibility in account. Writable.

    - **Returns**

      *bool*

  - **property width: int**

    Width of the layer.

    - **Returns**

      int

### PixelLayer

- **class psd\_tools.api.layers.PixelLayer(psd: Any, record: *LayerRecord*, channels: *ChannelDataList*, parent: TGroupMixin \| None)**

  Layer that has rasterized image in pixels.

  Example:

  ```
  assert layer.kind == 'pixel':
  image = layer.composite()
  image.save('layer.png')
  ```

  - **property bbox: tuple\[int, int, int, int\]**

    (left, top, right, bottom) tuple.

  - **property blend\_mode: *BlendMode***

    Blend mode of this layer. Writable.

    Example:

    ```
    from psd_tools.constants import BlendMode
    if layer.blend_mode == BlendMode.NORMAL:
        layer.blend_mode = BlendMode.SCREEN
    ```

    - **Returns**

      *BlendMode*.

  - **property bottom: int**

    Bottom coordinate.

    - **Returns**

      int

  - **property clip\_layers: list\[Self\]**

    Clip layers associated with this layer.

    - **Returns**

      list of layers

  - **property clipping\_layer: bool**

    Clipping flag for this layer. Writable.

    - **Returns**

      *bool*

  - **composite(viewport: tuple\[int, int, int, int\] \| None = None, force: bool = False, color: float \| tuple\[float, ...\] \| ndarray = 1.0, alpha: float \| ndarray = 0.0, layer\_filter: Callable \| None = None, apply\_icc: bool = True) -\> Image \| None**

    Composite layer and masks (mask, vector mask, and clipping layers).

    - **Parameters**

      - •

        **viewport** -- Viewport bounding box specified by (x1, y1, x2, y2) tuple. Default is the layer's bbox.

      - •

        **force** -- Boolean flag to force vector drawing.

      - •

        **color** -- Backdrop color specified by scalar or tuple of scalar. The color value should be in \[0.0, 1.0\]. For example, (1., 0., 0.) specifies red in RGB color mode.

      - •

        **alpha** -- Backdrop alpha in \[0.0, 1.0\].

      - •

        **layer\_filter** -- Callable that takes a layer as argument and returns whether if the layer is composited. Default is *is\_visible()*.

    - **Returns**

      **PIL.Image** or *None*.

  - **delete\_layer() -\> Self**

    Deletes the layer and all its child layers if the layer is a group from its parent (group or psdimage).

  - **property effects: *Effects***

    Layer effects.

    - **Returns**

      *Effects*

  - **classmethod frompil(pil\_im: Image, psd\_file: Any \| None = None, layer\_name: str = 'Layer', top: int = 0, left: int = 0, compression: *Compression* = Compression.RLE, \*\*kwargs: Any) -\> *PixelLayer***

    Creates a PixelLayer from a PIL image for a given psd file.

    - **Parameters**

      - •

        **pil\_im** -- The **Image** object to convert to photoshop

      - •

        **psdfile** -- The psd file the image will be converted for.

      - •

        **layer\_name** -- The name of the layer. Defaults to "Layer"

      - •

        **top** -- Pixelwise offset from the top of the canvas for the new layer.

      - •

        **left** -- Pixelwise offset from the left of the canvas for the new layer.

      - •

        **compression** -- Compression algorithm to use for the data.

    - **Returns**

      A *PixelLayer* object

  - **has\_clip\_layers() -\> bool**

    Returns True if the layer has associated clipping.

    - **Returns**

      *bool*

  - **has\_effects() -\> bool**

    Returns True if the layer has effects.

    - **Returns**

      *bool*

  - **has\_mask() -\> bool**

    Returns True if the layer has a mask.

    - **Returns**

      *bool*

  - **has\_origination() -\> bool**

    Returns True if the layer has live shape properties.

    - **Returns**

      *bool*

  - **has\_pixels() -\> bool**

    Returns True if the layer has associated pixels. When this is True, *topil* method returns **PIL.Image**.

    - **Returns**

      *bool*

  - **has\_stroke() -\> bool**

    Returns True if the shape has a stroke.

  - **has\_vector\_mask() -\> bool**

    Returns True if the layer has a vector mask.

    - **Returns**

      *bool*

  - **property height: int**

    Height of the layer.

    - **Returns**

      int

  - **is\_group() -\> bool**

    Return True if the layer is a group.

    - **Returns**

      *bool*

  - **is\_visible() -\> bool**

    Layer visibility. Takes group visibility in account.

    - **Returns**

      *bool*

  - **property kind: str**

    Kind of this layer, such as group, pixel, shape, type, smartobject, or psdimage. Class name without *layer* suffix.

    - **Returns**

      *str*

  - **property layer\_id: int**

    Layer ID.

    - **Returns**

      int layer id. if the layer is not assigned an id, -1.

  - **property left: int**

    Left coordinate. Writable.

    - **Returns**

      int

  - **lock(lock\_flags: int = ProtectedFlags.COMPLETE) -\> None**

    Locks a layer accordind to the combination of flags.

    - **Parameters**

      **lockflags** -- An integer representing the locking state

    Example using the constants of ProtectedFlags and bitwise or operation to lock both pixels and positions:

    ```
    layer.lock(ProtectedFlags.COMPOSITE | ProtectedFlags.POSITION)
    ```

  - **property mask: *Mask* \| None**

    Returns mask associated with this layer.

    - **Returns**

      *Mask* or *None*

  - **move\_down(offset: int = 1) -\> Self**

    Moves the layer down a certain offset within the group the layer is in.

    - **Parameters**

      **offset**

  - **move\_to\_group(group: GroupMixin) -\> Self**

    Moves the layer to the given group, updates the tree metadata as needed.

    - **Parameters**

      **group** -- The group the current layer will be moved into.

  - **move\_up(offset: int = 1) -\> Self**

    Moves the layer up a certain offset within the group the layer is in.

    - **Parameters**

      **offset**

  - **property name: str**

    Layer name. Writable.

    - **Returns**

      *str*

  - **numpy(channel: str \| None = None, real\_mask: bool = True) -\> ndarray \| None**

    Get NumPy array of the layer.

    - **Parameters**

      **channel** -- Which channel to return, can be 'color', 'shape', 'alpha', or 'mask'. Default is 'color+alpha'.

    - **Returns**

      **numpy.ndarray** or None if there is no pixel.

  - **property offset: tuple\[int, int\]**

    (left, top) tuple. Writable.

    - **Returns**

      *tuple*

  - **property opacity: int**

    Opacity of this layer in \[0, 255\] range. Writable.

    - **Returns**

      int

  - **property origination: list\[Origination\]**

    Property for a list of live shapes or a line.

    Some of the vector masks have associated live shape properties, that are Photoshop feature to handle primitive shapes such as a rectangle, an ellipse, or a line. Vector masks without live shape properties are plain path objects.

    See *psd\_tools.api.shape*.

    - **Returns**

      List of *Invalidated*, *Rectangle*, *RoundedRectangle*, *Ellipse*, or *Line*.

  - **property parent: TGroupMixin \| None**

    Parent of this layer.

  - **property right: int**

    Right coordinate.

    - **Returns**

      int

  - **property size: tuple\[int, int\]**

    (width, height) tuple.

    - **Returns**

      *tuple*

  - **property stroke: *Stroke* \| None**

    Property for strokes.

  - **property tagged\_blocks: *TaggedBlocks***

    Layer tagged blocks that is a dict-like container of settings.

    See *psd\_tools.constants.Tag* for available keys.

    - **Returns**

      *TaggedBlocks*.

    Example:

    ```
    from psd_tools.constants import Tag
    metadata = layer.tagged_blocks.get_data(Tag.METADATA_SETTING)
    ```

  - **property top: int**

    Top coordinate. Writable.

    - **Returns**

      int

  - **topil(channel: int \| None = None, apply\_icc: bool = True) -\> Image \| None**

    Get PIL Image of the layer.

    - **Parameters**

      - •

        **channel** -- Which channel to return; e.g., 0 for 'R' channel in RGB image. See *ChannelID*. When *None*, the method returns all the channels supported by PIL modes.

      - •

        **apply\_icc** -- Whether to apply ICC profile conversion to sRGB.

    - **Returns**

      **PIL.Image**, or *None* if the layer has no pixels.

    Example:

    ```
    from psd_tools.constants import ChannelID
    image = layer.topil()
    red = layer.topil(ChannelID.CHANNEL_0)
    alpha = layer.topil(ChannelID.TRANSPARENCY_MASK)
    ```

    **NOTE:**

    Not all of the PSD image modes are supported in **PIL.Image**. For example, 'CMYK' mode cannot include alpha channel in PIL. In this case, topil drops alpha channel.

  - **property vector\_mask: *VectorMask* \| None**

    Returns vector mask associated with this layer.

    - **Returns**

      *VectorMask* or *None*

  - **property visible: bool**

    Layer visibility. Doesn't take group visibility in account. Writable.

    - **Returns**

      *bool*

  - **property width: int**

    Width of the layer.

    - **Returns**

      int

### ShapeLayer

- **class psd\_tools.api.layers.ShapeLayer(\*args: Any)**

  Layer that has drawing in vector mask.

  - **property bbox: tuple\[int, int, int, int\]**

    (left, top, right, bottom) tuple.

  - **property blend\_mode: *BlendMode***

    Blend mode of this layer. Writable.

    Example:

    ```
    from psd_tools.constants import BlendMode
    if layer.blend_mode == BlendMode.NORMAL:
        layer.blend_mode = BlendMode.SCREEN
    ```

    - **Returns**

      *BlendMode*.

  - **property bottom: int**

    Bottom coordinate.

    - **Returns**

      int

  - **property clip\_layers: list\[Self\]**

    Clip layers associated with this layer.

    - **Returns**

      list of layers

  - **property clipping\_layer: bool**

    Clipping flag for this layer. Writable.

    - **Returns**

      *bool*

  - **composite(viewport: tuple\[int, int, int, int\] \| None = None, force: bool = False, color: float \| tuple\[float, ...\] \| ndarray = 1.0, alpha: float \| ndarray = 0.0, layer\_filter: Callable \| None = None, apply\_icc: bool = True) -\> Image \| None**

    Composite layer and masks (mask, vector mask, and clipping layers).

    - **Parameters**

      - •

        **viewport** -- Viewport bounding box specified by (x1, y1, x2, y2) tuple. Default is the layer's bbox.

      - •

        **force** -- Boolean flag to force vector drawing.

      - •

        **color** -- Backdrop color specified by scalar or tuple of scalar. The color value should be in \[0.0, 1.0\]. For example, (1., 0., 0.) specifies red in RGB color mode.

      - •

        **alpha** -- Backdrop alpha in \[0.0, 1.0\].

      - •

        **layer\_filter** -- Callable that takes a layer as argument and returns whether if the layer is composited. Default is *is\_visible()*.

    - **Returns**

      **PIL.Image** or *None*.

  - **delete\_layer() -\> Self**

    Deletes the layer and all its child layers if the layer is a group from its parent (group or psdimage).

  - **property effects: *Effects***

    Layer effects.

    - **Returns**

      *Effects*

  - **has\_clip\_layers() -\> bool**

    Returns True if the layer has associated clipping.

    - **Returns**

      *bool*

  - **has\_effects() -\> bool**

    Returns True if the layer has effects.

    - **Returns**

      *bool*

  - **has\_mask() -\> bool**

    Returns True if the layer has a mask.

    - **Returns**

      *bool*

  - **has\_origination() -\> bool**

    Returns True if the layer has live shape properties.

    - **Returns**

      *bool*

  - **has\_pixels() -\> bool**

    Returns True if the layer has associated pixels. When this is True, *topil* method returns **PIL.Image**.

    - **Returns**

      *bool*

  - **has\_stroke() -\> bool**

    Returns True if the shape has a stroke.

  - **has\_vector\_mask() -\> bool**

    Returns True if the layer has a vector mask.

    - **Returns**

      *bool*

  - **property height: int**

    Height of the layer.

    - **Returns**

      int

  - **is\_group() -\> bool**

    Return True if the layer is a group.

    - **Returns**

      *bool*

  - **is\_visible() -\> bool**

    Layer visibility. Takes group visibility in account.

    - **Returns**

      *bool*

  - **property kind: str**

    Kind of this layer, such as group, pixel, shape, type, smartobject, or psdimage. Class name without *layer* suffix.

    - **Returns**

      *str*

  - **property layer\_id: int**

    Layer ID.

    - **Returns**

      int layer id. if the layer is not assigned an id, -1.

  - **property left: int**

    Left coordinate. Writable.

    - **Returns**

      int

  - **lock(lock\_flags: int = ProtectedFlags.COMPLETE) -\> None**

    Locks a layer accordind to the combination of flags.

    - **Parameters**

      **lockflags** -- An integer representing the locking state

    Example using the constants of ProtectedFlags and bitwise or operation to lock both pixels and positions:

    ```
    layer.lock(ProtectedFlags.COMPOSITE | ProtectedFlags.POSITION)
    ```

  - **property mask: *Mask* \| None**

    Returns mask associated with this layer.

    - **Returns**

      *Mask* or *None*

  - **move\_down(offset: int = 1) -\> Self**

    Moves the layer down a certain offset within the group the layer is in.

    - **Parameters**

      **offset**

  - **move\_to\_group(group: GroupMixin) -\> Self**

    Moves the layer to the given group, updates the tree metadata as needed.

    - **Parameters**

      **group** -- The group the current layer will be moved into.

  - **move\_up(offset: int = 1) -\> Self**

    Moves the layer up a certain offset within the group the layer is in.

    - **Parameters**

      **offset**

  - **property name: str**

    Layer name. Writable.

    - **Returns**

      *str*

  - **numpy(channel: str \| None = None, real\_mask: bool = True) -\> ndarray \| None**

    Get NumPy array of the layer.

    - **Parameters**

      **channel** -- Which channel to return, can be 'color', 'shape', 'alpha', or 'mask'. Default is 'color+alpha'.

    - **Returns**

      **numpy.ndarray** or None if there is no pixel.

  - **property offset: tuple\[int, int\]**

    (left, top) tuple. Writable.

    - **Returns**

      *tuple*

  - **property opacity: int**

    Opacity of this layer in \[0, 255\] range. Writable.

    - **Returns**

      int

  - **property origination: list\[Origination\]**

    Property for a list of live shapes or a line.

    Some of the vector masks have associated live shape properties, that are Photoshop feature to handle primitive shapes such as a rectangle, an ellipse, or a line. Vector masks without live shape properties are plain path objects.

    See *psd\_tools.api.shape*.

    - **Returns**

      List of *Invalidated*, *Rectangle*, *RoundedRectangle*, *Ellipse*, or *Line*.

  - **property parent: TGroupMixin \| None**

    Parent of this layer.

  - **property right: int**

    Right coordinate.

    - **Returns**

      int

  - **property size: tuple\[int, int\]**

    (width, height) tuple.

    - **Returns**

      *tuple*

  - **property stroke: *Stroke* \| None**

    Property for strokes.

  - **property tagged\_blocks: *TaggedBlocks***

    Layer tagged blocks that is a dict-like container of settings.

    See *psd\_tools.constants.Tag* for available keys.

    - **Returns**

      *TaggedBlocks*.

    Example:

    ```
    from psd_tools.constants import Tag
    metadata = layer.tagged_blocks.get_data(Tag.METADATA_SETTING)
    ```

  - **property top: int**

    Top coordinate. Writable.

    - **Returns**

      int

  - **topil(channel: int \| None = None, apply\_icc: bool = True) -\> Image \| None**

    Get PIL Image of the layer.

    - **Parameters**

      - •

        **channel** -- Which channel to return; e.g., 0 for 'R' channel in RGB image. See *ChannelID*. When *None*, the method returns all the channels supported by PIL modes.

      - •

        **apply\_icc** -- Whether to apply ICC profile conversion to sRGB.

    - **Returns**

      **PIL.Image**, or *None* if the layer has no pixels.

    Example:

    ```
    from psd_tools.constants import ChannelID
    image = layer.topil()
    red = layer.topil(ChannelID.CHANNEL_0)
    alpha = layer.topil(ChannelID.TRANSPARENCY_MASK)
    ```

    **NOTE:**

    Not all of the PSD image modes are supported in **PIL.Image**. For example, 'CMYK' mode cannot include alpha channel in PIL. In this case, topil drops alpha channel.

  - **property vector\_mask: *VectorMask* \| None**

    Returns vector mask associated with this layer.

    - **Returns**

      *VectorMask* or *None*

  - **property visible: bool**

    Layer visibility. Doesn't take group visibility in account. Writable.

    - **Returns**

      *bool*

  - **property width: int**

    Width of the layer.

    - **Returns**

      int

### SmartObjectLayer

- **class psd\_tools.api.layers.SmartObjectLayer(psd: Any, record: *LayerRecord*, channels: *ChannelDataList*, parent: TGroupMixin \| None)**

  Layer that inserts external data.

  Use *smart\_object* attribute to get the external data. See *SmartObject*.

  Example:

  ```
  import io
  if layer.smart_object.filetype == 'jpg':
      image = Image.open(io.BytesIO(layer.smart_object.data))
  ```

  - **property bbox: tuple\[int, int, int, int\]**

    (left, top, right, bottom) tuple.

  - **property blend\_mode: *BlendMode***

    Blend mode of this layer. Writable.

    Example:

    ```
    from psd_tools.constants import BlendMode
    if layer.blend_mode == BlendMode.NORMAL:
        layer.blend_mode = BlendMode.SCREEN
    ```

    - **Returns**

      *BlendMode*.

  - **property bottom: int**

    Bottom coordinate.

    - **Returns**

      int

  - **property clip\_layers: list\[Self\]**

    Clip layers associated with this layer.

    - **Returns**

      list of layers

  - **property clipping\_layer: bool**

    Clipping flag for this layer. Writable.

    - **Returns**

      *bool*

  - **composite(viewport: tuple\[int, int, int, int\] \| None = None, force: bool = False, color: float \| tuple\[float, ...\] \| ndarray = 1.0, alpha: float \| ndarray = 0.0, layer\_filter: Callable \| None = None, apply\_icc: bool = True) -\> Image \| None**

    Composite layer and masks (mask, vector mask, and clipping layers).

    - **Parameters**

      - •

        **viewport** -- Viewport bounding box specified by (x1, y1, x2, y2) tuple. Default is the layer's bbox.

      - •

        **force** -- Boolean flag to force vector drawing.

      - •

        **color** -- Backdrop color specified by scalar or tuple of scalar. The color value should be in \[0.0, 1.0\]. For example, (1., 0., 0.) specifies red in RGB color mode.

      - •

        **alpha** -- Backdrop alpha in \[0.0, 1.0\].

      - •

        **layer\_filter** -- Callable that takes a layer as argument and returns whether if the layer is composited. Default is *is\_visible()*.

    - **Returns**

      **PIL.Image** or *None*.

  - **delete\_layer() -\> Self**

    Deletes the layer and all its child layers if the layer is a group from its parent (group or psdimage).

  - **property effects: *Effects***

    Layer effects.

    - **Returns**

      *Effects*

  - **has\_clip\_layers() -\> bool**

    Returns True if the layer has associated clipping.

    - **Returns**

      *bool*

  - **has\_effects() -\> bool**

    Returns True if the layer has effects.

    - **Returns**

      *bool*

  - **has\_mask() -\> bool**

    Returns True if the layer has a mask.

    - **Returns**

      *bool*

  - **has\_origination() -\> bool**

    Returns True if the layer has live shape properties.

    - **Returns**

      *bool*

  - **has\_pixels() -\> bool**

    Returns True if the layer has associated pixels. When this is True, *topil* method returns **PIL.Image**.

    - **Returns**

      *bool*

  - **has\_stroke() -\> bool**

    Returns True if the shape has a stroke.

  - **has\_vector\_mask() -\> bool**

    Returns True if the layer has a vector mask.

    - **Returns**

      *bool*

  - **property height: int**

    Height of the layer.

    - **Returns**

      int

  - **is\_group() -\> bool**

    Return True if the layer is a group.

    - **Returns**

      *bool*

  - **is\_visible() -\> bool**

    Layer visibility. Takes group visibility in account.

    - **Returns**

      *bool*

  - **property kind: str**

    Kind of this layer, such as group, pixel, shape, type, smartobject, or psdimage. Class name without *layer* suffix.

    - **Returns**

      *str*

  - **property layer\_id: int**

    Layer ID.

    - **Returns**

      int layer id. if the layer is not assigned an id, -1.

  - **property left: int**

    Left coordinate. Writable.

    - **Returns**

      int

  - **lock(lock\_flags: int = ProtectedFlags.COMPLETE) -\> None**

    Locks a layer accordind to the combination of flags.

    - **Parameters**

      **lockflags** -- An integer representing the locking state

    Example using the constants of ProtectedFlags and bitwise or operation to lock both pixels and positions:

    ```
    layer.lock(ProtectedFlags.COMPOSITE | ProtectedFlags.POSITION)
    ```

  - **property mask: *Mask* \| None**

    Returns mask associated with this layer.

    - **Returns**

      *Mask* or *None*

  - **move\_down(offset: int = 1) -\> Self**

    Moves the layer down a certain offset within the group the layer is in.

    - **Parameters**

      **offset**

  - **move\_to\_group(group: GroupMixin) -\> Self**

    Moves the layer to the given group, updates the tree metadata as needed.

    - **Parameters**

      **group** -- The group the current layer will be moved into.

  - **move\_up(offset: int = 1) -\> Self**

    Moves the layer up a certain offset within the group the layer is in.

    - **Parameters**

      **offset**

  - **property name: str**

    Layer name. Writable.

    - **Returns**

      *str*

  - **numpy(channel: str \| None = None, real\_mask: bool = True) -\> ndarray \| None**

    Get NumPy array of the layer.

    - **Parameters**

      **channel** -- Which channel to return, can be 'color', 'shape', 'alpha', or 'mask'. Default is 'color+alpha'.

    - **Returns**

      **numpy.ndarray** or None if there is no pixel.

  - **property offset: tuple\[int, int\]**

    (left, top) tuple. Writable.

    - **Returns**

      *tuple*

  - **property opacity: int**

    Opacity of this layer in \[0, 255\] range. Writable.

    - **Returns**

      int

  - **property origination: list\[Origination\]**

    Property for a list of live shapes or a line.

    Some of the vector masks have associated live shape properties, that are Photoshop feature to handle primitive shapes such as a rectangle, an ellipse, or a line. Vector masks without live shape properties are plain path objects.

    See *psd\_tools.api.shape*.

    - **Returns**

      List of *Invalidated*, *Rectangle*, *RoundedRectangle*, *Ellipse*, or *Line*.

  - **property parent: TGroupMixin \| None**

    Parent of this layer.

  - **property right: int**

    Right coordinate.

    - **Returns**

      int

  - **property size: tuple\[int, int\]**

    (width, height) tuple.

    - **Returns**

      *tuple*

  - **property smart\_object: *SmartObject***

    Associated smart object.

    - **Returns**

      *SmartObject*.

  - **property stroke: *Stroke* \| None**

    Property for strokes.

  - **property tagged\_blocks: *TaggedBlocks***

    Layer tagged blocks that is a dict-like container of settings.

    See *psd\_tools.constants.Tag* for available keys.

    - **Returns**

      *TaggedBlocks*.

    Example:

    ```
    from psd_tools.constants import Tag
    metadata = layer.tagged_blocks.get_data(Tag.METADATA_SETTING)
    ```

  - **property top: int**

    Top coordinate. Writable.

    - **Returns**

      int

  - **topil(channel: int \| None = None, apply\_icc: bool = True) -\> Image \| None**

    Get PIL Image of the layer.

    - **Parameters**

      - •

        **channel** -- Which channel to return; e.g., 0 for 'R' channel in RGB image. See *ChannelID*. When *None*, the method returns all the channels supported by PIL modes.

      - •

        **apply\_icc** -- Whether to apply ICC profile conversion to sRGB.

    - **Returns**

      **PIL.Image**, or *None* if the layer has no pixels.

    Example:

    ```
    from psd_tools.constants import ChannelID
    image = layer.topil()
    red = layer.topil(ChannelID.CHANNEL_0)
    alpha = layer.topil(ChannelID.TRANSPARENCY_MASK)
    ```

    **NOTE:**

    Not all of the PSD image modes are supported in **PIL.Image**. For example, 'CMYK' mode cannot include alpha channel in PIL. In this case, topil drops alpha channel.

  - **property vector\_mask: *VectorMask* \| None**

    Returns vector mask associated with this layer.

    - **Returns**

      *VectorMask* or *None*

  - **property visible: bool**

    Layer visibility. Doesn't take group visibility in account. Writable.

    - **Returns**

      *bool*

  - **property width: int**

    Width of the layer.

    - **Returns**

      int

### TypeLayer

- **class psd\_tools.api.layers.TypeLayer(\*args: Any)**

  Layer that has text and styling information for fonts or paragraphs.

  Text is accessible at *text* property. Styling information for paragraphs is in *engine\_dict*. Document styling information such as font list is is *resource\_dict*.

  Currently, textual information is read-only.

  Example:

  ```
  if layer.kind == 'type':
      print(layer.text)
      print(layer.engine_dict['StyleRun'])
      # Extract font for each substring in the text.
      text = layer.engine_dict['Editor']['Text'].value
      fontset = layer.resource_dict['FontSet']
      runlength = layer.engine_dict['StyleRun']['RunLengthArray']
      rundata = layer.engine_dict['StyleRun']['RunArray']
      index = 0
      for length, style in zip(runlength, rundata):
          substring = text[index:index + length]
          stylesheet = style['StyleSheet']['StyleSheetData']
          font = fontset[stylesheet['Font']]
          print('%r gets %s' % (substring, font))
          index += length
  ```

  - **property bbox: tuple\[int, int, int, int\]**

    (left, top, right, bottom) tuple.

  - **property blend\_mode: *BlendMode***

    Blend mode of this layer. Writable.

    Example:

    ```
    from psd_tools.constants import BlendMode
    if layer.blend_mode == BlendMode.NORMAL:
        layer.blend_mode = BlendMode.SCREEN
    ```

    - **Returns**

      *BlendMode*.

  - **property bottom: int**

    Bottom coordinate.

    - **Returns**

      int

  - **property clip\_layers: list\[Self\]**

    Clip layers associated with this layer.

    - **Returns**

      list of layers

  - **property clipping\_layer: bool**

    Clipping flag for this layer. Writable.

    - **Returns**

      *bool*

  - **composite(viewport: tuple\[int, int, int, int\] \| None = None, force: bool = False, color: float \| tuple\[float, ...\] \| ndarray = 1.0, alpha: float \| ndarray = 0.0, layer\_filter: Callable \| None = None, apply\_icc: bool = True) -\> Image \| None**

    Composite layer and masks (mask, vector mask, and clipping layers).

    - **Parameters**

      - •

        **viewport** -- Viewport bounding box specified by (x1, y1, x2, y2) tuple. Default is the layer's bbox.

      - •

        **force** -- Boolean flag to force vector drawing.

      - •

        **color** -- Backdrop color specified by scalar or tuple of scalar. The color value should be in \[0.0, 1.0\]. For example, (1., 0., 0.) specifies red in RGB color mode.

      - •

        **alpha** -- Backdrop alpha in \[0.0, 1.0\].

      - •

        **layer\_filter** -- Callable that takes a layer as argument and returns whether if the layer is composited. Default is *is\_visible()*.

    - **Returns**

      **PIL.Image** or *None*.

  - **delete\_layer() -\> Self**

    Deletes the layer and all its child layers if the layer is a group from its parent (group or psdimage).

  - **property document\_resources: *Dict***

    Resource set relevant to the document.

  - **property effects: *Effects***

    Layer effects.

    - **Returns**

      *Effects*

  - **property engine\_dict: *Dict***

    Styling information dict.

  - **has\_clip\_layers() -\> bool**

    Returns True if the layer has associated clipping.

    - **Returns**

      *bool*

  - **has\_effects() -\> bool**

    Returns True if the layer has effects.

    - **Returns**

      *bool*

  - **has\_mask() -\> bool**

    Returns True if the layer has a mask.

    - **Returns**

      *bool*

  - **has\_origination() -\> bool**

    Returns True if the layer has live shape properties.

    - **Returns**

      *bool*

  - **has\_pixels() -\> bool**

    Returns True if the layer has associated pixels. When this is True, *topil* method returns **PIL.Image**.

    - **Returns**

      *bool*

  - **has\_stroke() -\> bool**

    Returns True if the shape has a stroke.

  - **has\_vector\_mask() -\> bool**

    Returns True if the layer has a vector mask.

    - **Returns**

      *bool*

  - **property height: int**

    Height of the layer.

    - **Returns**

      int

  - **is\_group() -\> bool**

    Return True if the layer is a group.

    - **Returns**

      *bool*

  - **is\_visible() -\> bool**

    Layer visibility. Takes group visibility in account.

    - **Returns**

      *bool*

  - **property kind: str**

    Kind of this layer, such as group, pixel, shape, type, smartobject, or psdimage. Class name without *layer* suffix.

    - **Returns**

      *str*

  - **property layer\_id: int**

    Layer ID.

    - **Returns**

      int layer id. if the layer is not assigned an id, -1.

  - **property left: int**

    Left coordinate. Writable.

    - **Returns**

      int

  - **lock(lock\_flags: int = ProtectedFlags.COMPLETE) -\> None**

    Locks a layer accordind to the combination of flags.

    - **Parameters**

      **lockflags** -- An integer representing the locking state

    Example using the constants of ProtectedFlags and bitwise or operation to lock both pixels and positions:

    ```
    layer.lock(ProtectedFlags.COMPOSITE | ProtectedFlags.POSITION)
    ```

  - **property mask: *Mask* \| None**

    Returns mask associated with this layer.

    - **Returns**

      *Mask* or *None*

  - **move\_down(offset: int = 1) -\> Self**

    Moves the layer down a certain offset within the group the layer is in.

    - **Parameters**

      **offset**

  - **move\_to\_group(group: GroupMixin) -\> Self**

    Moves the layer to the given group, updates the tree metadata as needed.

    - **Parameters**

      **group** -- The group the current layer will be moved into.

  - **move\_up(offset: int = 1) -\> Self**

    Moves the layer up a certain offset within the group the layer is in.

    - **Parameters**

      **offset**

  - **property name: str**

    Layer name. Writable.

    - **Returns**

      *str*

  - **numpy(channel: str \| None = None, real\_mask: bool = True) -\> ndarray \| None**

    Get NumPy array of the layer.

    - **Parameters**

      **channel** -- Which channel to return, can be 'color', 'shape', 'alpha', or 'mask'. Default is 'color+alpha'.

    - **Returns**

      **numpy.ndarray** or None if there is no pixel.

  - **property offset: tuple\[int, int\]**

    (left, top) tuple. Writable.

    - **Returns**

      *tuple*

  - **property opacity: int**

    Opacity of this layer in \[0, 255\] range. Writable.

    - **Returns**

      int

  - **property origination: list\[Origination\]**

    Property for a list of live shapes or a line.

    Some of the vector masks have associated live shape properties, that are Photoshop feature to handle primitive shapes such as a rectangle, an ellipse, or a line. Vector masks without live shape properties are plain path objects.

    See *psd\_tools.api.shape*.

    - **Returns**

      List of *Invalidated*, *Rectangle*, *RoundedRectangle*, *Ellipse*, or *Line*.

  - **property parent: TGroupMixin \| None**

    Parent of this layer.

  - **property resource\_dict: *Dict***

    Resource set.

  - **property right: int**

    Right coordinate.

    - **Returns**

      int

  - **property size: tuple\[int, int\]**

    (width, height) tuple.

    - **Returns**

      *tuple*

  - **property stroke: *Stroke* \| None**

    Property for strokes.

  - **property tagged\_blocks: *TaggedBlocks***

    Layer tagged blocks that is a dict-like container of settings.

    See *psd\_tools.constants.Tag* for available keys.

    - **Returns**

      *TaggedBlocks*.

    Example:

    ```
    from psd_tools.constants import Tag
    metadata = layer.tagged_blocks.get_data(Tag.METADATA_SETTING)
    ```

  - **property text: str**

    Text in the layer. Read-only.

    **NOTE:**

    New-line character in Photoshop is *'\\r'*.

  - **property text\_type: *TextType* \| None**

    Text type. Read-only.

    - **Returns**

      - •

        *psd\_tools.constants.TextType.POINT* for point type text (also known as character type)

      - •

        *psd\_tools.constants.TextType.PARAGRAPH* for paragraph type text (also known as area type)

      - •

        *None* if text type cannot be determined or information is unavailable

    See *psd\_tools.constants.TextType*.

  - **property top: int**

    Top coordinate. Writable.

    - **Returns**

      int

  - **topil(channel: int \| None = None, apply\_icc: bool = True) -\> Image \| None**

    Get PIL Image of the layer.

    - **Parameters**

      - •

        **channel** -- Which channel to return; e.g., 0 for 'R' channel in RGB image. See *ChannelID*. When *None*, the method returns all the channels supported by PIL modes.

      - •

        **apply\_icc** -- Whether to apply ICC profile conversion to sRGB.

    - **Returns**

      **PIL.Image**, or *None* if the layer has no pixels.

    Example:

    ```
    from psd_tools.constants import ChannelID
    image = layer.topil()
    red = layer.topil(ChannelID.CHANNEL_0)
    alpha = layer.topil(ChannelID.TRANSPARENCY_MASK)
    ```

    **NOTE:**

    Not all of the PSD image modes are supported in **PIL.Image**. For example, 'CMYK' mode cannot include alpha channel in PIL. In this case, topil drops alpha channel.

  - **property transform: tuple\[float, float, float, float, float, float\]**

    Matrix (xx, xy, yx, yy, tx, ty) applies affine transformation.

  - **property vector\_mask: *VectorMask* \| None**

    Returns vector mask associated with this layer.

    - **Returns**

      *VectorMask* or *None*

  - **property visible: bool**

    Layer visibility. Doesn't take group visibility in account. Writable.

    - **Returns**

      *bool*

  - **property warp: DescriptorBlock \| None**

    Warp configuration.

  - **property width: int**

    Width of the layer.

    - **Returns**

      int

### psd\_tools.api.mask

Mask module.

### Mask

- **class psd\_tools.api.mask.Mask(layer: Any)**

  Mask data attached to a layer.

  There are two distinct internal mask data: user mask and vector mask. User mask refers any pixel-based mask whereas vector mask refers a mask from a shape path. Internally, two masks are combined and referred real mask.

  - **property background\_color: int**

    Background color.

  - **property bbox: tuple\[int, int, int, int\]**

    BBox

  - **property bottom: int**

    Bottom coordinate.

  - **property disabled: bool**

    Disabled.

  - **property flags: *MaskFlags***

    Flags.

  - **property height: int**

    Height.

  - **property left: int**

    Left coordinate.

  - **property parameters**

    Parameters.

  - **property real\_flags: *MaskFlags* \| None**

    Real flag.

  - **property right: int**

    Right coordinate.

  - **property size: tuple\[int, int\]**

    (Width, Height) tuple.

  - **property top: int**

    Top coordinate.

  - **topil(real: bool = True, \*\*kwargs: Any) -\> Image \| None**

    Get PIL Image of the mask.

    - **Parameters**

      **real** -- When True, returns pixel + vector mask combined.

    - **Returns**

      PIL Image object, or None if the mask is empty.

  - **property width: int**

    Width.

### psd\_tools.api.shape

Shape module.

In PSD/PSB, shapes are all represented as *VectorMask* in each layer, and optionally there might be **Origination** object to control live shape properties and *Stroke* to specify how outline is stylized.

### VectorMask

- **class psd\_tools.api.shape.VectorMask(data: *VectorMaskSetting*)**

  Vector mask data.

  Vector mask is a resolution-independent mask that consists of one or more Path objects. In Photoshop, all the path objects are represented as Bezier curves. Check *paths* property for how to deal with path objects.

  - **property bbox: tuple\[float, float, float, float\]**

    Bounding box tuple (left, top, right, bottom) in relative coordinates, where top-left corner is (0., 0.) and bottom-right corner is (1., 1.).

    - **Returns**

      *tuple*

  - **property clipboard\_record: *ClipboardRecord* \| None**

    Clipboard record containing bounding box information.

    Depending on the Photoshop version, this field can be *None*.

  - **property disabled: bool**

    If the mask is disabled.

  - **property initial\_fill\_rule: int**

    Initial fill rule.

    When 0, fill inside of the path. When 1, fill outside of the shape.

    - **Returns**

      *int*

  - **property inverted: bool**

    Invert the mask.

  - **property not\_linked: bool**

    If the knots are not linked.

  - **property paths: list\[*Subpath*\]**

    List of *Subpath*. Subpath is a list-like structure that contains one or more *Knot* items. Knot contains relative coordinates of control points for a Bezier curve. *index* indicates which origination item the subpath belongs, and *operation* indicates how to combine multiple shape paths.

    In PSD, path fill rule is even-odd.

    Example:

    ```
    for subpath in layer.vector_mask.paths:
        anchors = [(
            int(knot.anchor[1] * psd.width),
            int(knot.anchor[0] * psd.height),
        ) for knot in subpath]
    ```

    - **Returns**

      List of Subpath.

### Stroke

- **class psd\_tools.api.shape.Stroke(data: *VectorStrokeContentSetting*)**

  Stroke contains decorative information for strokes.

  This is a thin wrapper around *Descriptor* structure. Check *\_data* attribute to get the raw data.

  - **property blend\_mode**

    Blend mode.

  - **property content**

    Fill effect.

  - **property enabled: bool**

    If the stroke is enabled.

  - **property fill\_enabled: bool**

    If the stroke fill is enabled.

  - **property line\_alignment: str**

    Alignment, one of *inner*, *outer*, *center*.

  - **property line\_cap\_type: str**

    Cap type, one of *butt*, *round*, *square*.

  - **property line\_dash\_offset: float**

    Line dash offset in float.

    - **Returns**

      float

  - **property line\_dash\_set: list**

    Line dash set in list of **UnitFloat**.

    - **Returns**

      list

  - **property line\_join\_type: str**

    Join type, one of *miter*, *round*, *bevel*.

  - **property line\_width: float**

    Stroke width in float.

  - **property miter\_limit**

    Miter limit in float.

  - **property opacity**

    Opacity value.

  - **property stroke\_adjust**

    Stroke adjust

### Origination

Origination keeps live shape properties for some of the primitive shapes. Origination objects are accessible via **origination** property of layers. Following primitive shapes are defined: *Invalidated*, *Line*, *Rectangle*, *Ellipse*, and *RoundedRectangle*.

### Invalidated

- **class psd\_tools.api.shape.Invalidated(data)**

  Invalidated live shape.

  This equals to a primitive shape that does not provide Live shape properties. Use *VectorMask* to access shape information instead of this origination object.

  - **property invalidated: bool**

    - **Returns**

      *bool*

### Line

- **class psd\_tools.api.shape.Line(data)**

  Line live shape.

  - **property arrow\_conc: int**

    - **Returns**

      *int*

  - **property arrow\_end: bool**

    Line arrow end.

    - **Returns**

      *bool*

  - **property arrow\_length: float**

    Line arrow length.

    - **Returns**

      *float*

  - **property arrow\_start: bool**

    Line arrow start.

    - **Returns**

      *bool*

  - **property arrow\_width: float**

    Line arrow width.

    - **Returns**

      *float*

  - **property bbox: tuple\[float, float, float, float\]**

    Bounding box of the live shape.

    - **Returns**

      *Descriptor*

  - **property index: int**

    Origination item index.

    - **Returns**

      *int*

  - **property invalidated: bool**

    - **Returns**

      *bool*

  - **property line\_end: *Descriptor***

    Line end.

    - **Returns**

      *Descriptor*

  - **property line\_start: *Descriptor***

    Line start.

    - **Returns**

      *Descriptor*

  - **property line\_weight: float**

    Line weight

    - **Returns**

      *float*

  - **property origin\_type: int**

    Type of the vector shape.

    - •

      1: *Rectangle*

    - •

      2: *RoundedRectangle*

    - •

      4: *Line*

    - •

      5: *Ellipse*

    - **Returns**

      *int*

  - **property resolution: float**

    Resolution.

    - **Returns**

      *float*

### Ellipse

- **class psd\_tools.api.shape.Ellipse(data)**

  Ellipse live shape.

  - **property bbox: tuple\[float, float, float, float\]**

    Bounding box of the live shape.

    - **Returns**

      *Descriptor*

  - **property index: int**

    Origination item index.

    - **Returns**

      *int*

  - **property invalidated: bool**

    - **Returns**

      *bool*

  - **property origin\_type: int**

    Type of the vector shape.

    - •

      1: *Rectangle*

    - •

      2: *RoundedRectangle*

    - •

      4: *Line*

    - •

      5: *Ellipse*

    - **Returns**

      *int*

  - **property resolution: float**

    Resolution.

    - **Returns**

      *float*

### Rectangle

- **class psd\_tools.api.shape.Rectangle(data)**

  Rectangle live shape.

  - **property bbox: tuple\[float, float, float, float\]**

    Bounding box of the live shape.

    - **Returns**

      *Descriptor*

  - **property index: int**

    Origination item index.

    - **Returns**

      *int*

  - **property invalidated: bool**

    - **Returns**

      *bool*

  - **property origin\_type: int**

    Type of the vector shape.

    - •

      1: *Rectangle*

    - •

      2: *RoundedRectangle*

    - •

      4: *Line*

    - •

      5: *Ellipse*

    - **Returns**

      *int*

  - **property resolution: float**

    Resolution.

    - **Returns**

      *float*

### RoundedRectangle

- **class psd\_tools.api.shape.RoundedRectangle(data)**

  Rounded rectangle live shape.

  - **property bbox: tuple\[float, float, float, float\]**

    Bounding box of the live shape.

    - **Returns**

      *Descriptor*

  - **property index: int**

    Origination item index.

    - **Returns**

      *int*

  - **property invalidated: bool**

    - **Returns**

      *bool*

  - **property origin\_type: int**

    Type of the vector shape.

    - •

      1: *Rectangle*

    - •

      2: *RoundedRectangle*

    - •

      4: *Line*

    - •

      5: *Ellipse*

    - **Returns**

      *int*

  - **property radii**

    Corner radii of rounded rectangles. The order is top-left, top-right, bottom-left, bottom-right.

    - **Returns**

      *Descriptor*

  - **property resolution: float**

    Resolution.

    - **Returns**

      *float*

### psd\_tools.api.smart\_object

Smart object module.

### SmartObject

- **class psd\_tools.api.smart\_object.SmartObject(layer)**

  Smart object that represents embedded or external file.

  Smart objects are attached to *SmartObjectLayer*.

  - **property data: bytes**

    Embedded file content, or empty if kind is *external* or *alias*

  - **property filename: str**

    Original file name of the object.

  - **property filesize: int**

    File size of the object.

  - **property filetype: str**

    Preferred file extension, such as *jpg*.

  - **is\_psd() -\> bool**

    Return True if the file is embedded PSD/PSB.

  - **property kind: str**

    Kind of the link, 'data', 'alias', or 'external'.

  - **open(external\_dir: str \| None = None) -\> Iterator\[BytesIO\]**

    Open the smart object as binary IO.

    - **Parameters**

      **external\_dir** -- Path to the directory of the external file.

    Example:

    ```
    with layer.smart_object.open() as f:
        data = f.read()
    ```

  - **property resolution**

    Resolution of the object.

  - **save(filename: str \| None = None) -\> None**

    Save the smart object to a file.

    - **Parameters**

      **filename** -- File name to export. If None, use the embedded name.

  - **property transform\_box**

    A tuple representing the coordinates of the smart objects's transformed box. This box is the result of one or more transformations such as scaling, rotation, translation, or skewing to the original bounding box of the smart object.

    The format of the tuple is as follows: (x1, y1, x2, y2, x3, y3, x4, y4)

    Where 1 is top left corner, 2 is top right, 3 is bottom right and 4 is bottom left.

  - **property unique\_id: str**

    UUID of the object.

  - **property warp**

    Warp parameters.

### psd\_tools.constants

Various constants for psd\_tools

### BlendMode

- **class psd\_tools.constants.BlendMode(value, names=\<not given\>, \*values, module=None, qualname=None, type=None, start=1, boundary=None)**

  Blend modes.

  - **COLOR = b'colr'**

    - **COLOR\_BURN = b'idiv'**

    - **COLOR\_DODGE = b'div '**

    - **DARKEN = b'dark'**

    - **DARKER\_COLOR = b'dkCl'**

    - **DIFFERENCE = b'diff'**

    - **DISSOLVE = b'diss'**

    - **DIVIDE = b'fdiv'**

    - **EXCLUSION = b'smud'**

    - **HARD\_LIGHT = b'hLit'**

    - **HARD\_MIX = b'hMix'**

    - **HUE = b'hue '**

    - **LIGHTEN = b'lite'**

    - **LIGHTER\_COLOR = b'lgCl'**

    - **LINEAR\_BURN = b'lbrn'**

    - **LINEAR\_DODGE = b'lddg'**

    - **LINEAR\_LIGHT = b'lLit'**

    - **LUMINOSITY = b'lum '**

    - **MULTIPLY = b'mul '**

    - **NORMAL = b'norm'**

    - **OVERLAY = b'over'**

    - **PASS\_THROUGH = b'pass'**

    - **PIN\_LIGHT = b'pLit'**

    - **SATURATION = b'sat '**

    - **SCREEN = b'scrn'**

    - **SOFT\_LIGHT = b'sLit'**

    - **SUBTRACT = b'fsub'**

    - **VIVID\_LIGHT = b'vLit'**

    ### ChannelID

- **class psd\_tools.constants.ChannelID(value, names=\<not given\>, \*values, module=None, qualname=None, type=None, start=1, boundary=None)**

  Channel types.

  - **CHANNEL\_0 = 0**

    - **CHANNEL\_1 = 1**

    - **CHANNEL\_2 = 2**

    - **CHANNEL\_3 = 3**

    - **CHANNEL\_4 = 4**

    - **CHANNEL\_5 = 5**

    - **CHANNEL\_6 = 6**

    - **CHANNEL\_7 = 7**

    - **CHANNEL\_8 = 8**

    - **CHANNEL\_9 = 9**

    - **REAL\_USER\_LAYER\_MASK = -3**

    - **TRANSPARENCY\_MASK = -1**

    - **USER\_LAYER\_MASK = -2**

    ### Clipping

- **class psd\_tools.constants.Clipping(value, names=\<not given\>, \*values, module=None, qualname=None, type=None, start=1, boundary=None)**

  Clipping.

  - **BASE = 0**

    - **NON\_BASE = 1**

    ### ColorMode

- **class psd\_tools.constants.ColorMode(value, names=\<not given\>, \*values, module=None, qualname=None, type=None, start=1, boundary=None)**

  Color mode.

  - **BITMAP = 0**

    - **CMYK = 4**

    - **DUOTONE = 8**

    - **GRAYSCALE = 1**

    - **INDEXED = 2**

    - **LAB = 9**

    - **MULTICHANNEL = 7**

    - **RGB = 3**

    - **static channels(value, alpha=False)**

    ### ColorSpaceID

- **class psd\_tools.constants.ColorSpaceID(value, names=\<not given\>, \*values, module=None, qualname=None, type=None, start=1, boundary=None)**

  Color space types.

  - **CMYK = 2**

    - **GRAYSCALE = 8**

    - **HSB = 1**

    - **LAB = 7**

    - **RGB = 0**

    ### Compression

- **class psd\_tools.constants.Compression(value, names=\<not given\>, \*values, module=None, qualname=None, type=None, start=1, boundary=None)**

  Compression modes.

  Compression. 0 = Raw Data, 1 = RLE compressed, 2 = ZIP without prediction, 3 = ZIP with prediction.

  - **RAW = 0**

    - **RLE = 1**

    - **ZIP = 2**

    - **ZIP\_WITH\_PREDICTION = 3**

    ### EffectOSType

- **class psd\_tools.constants.EffectOSType(value, names=\<not given\>, \*values, module=None, qualname=None, type=None, start=1, boundary=None)**

  OS Type keys for Layer Effects.

  - **BEVEL = b'bevl'**

    - **COMMON\_STATE = b'cmnS'**

    - **DROP\_SHADOW = b'dsdw'**

    - **INNER\_GLOW = b'iglw'**

    - **INNER\_SHADOW = b'isdw'**

    - **OUTER\_GLOW = b'oglw'**

    - **SOLID\_FILL = b'sofi'**

    ### GlobalLayerMaskKind

- **class psd\_tools.constants.GlobalLayerMaskKind(value, names=\<not given\>, \*values, module=None, qualname=None, type=None, start=1, boundary=None)**

  Global layer mask kind.

  - **COLOR\_PROTECTED = 1**

    - **COLOR\_SELECTED = 0**

    - **PER\_LAYER = 128**

    ### LinkedLayerType

- **class psd\_tools.constants.LinkedLayerType(value, names=\<not given\>, \*values, module=None, qualname=None, type=None, start=1, boundary=None)**

  Linked layer types.

  - **ALIAS = b'liFA'**

    - **DATA = b'liFD'**

    - **EXTERNAL = b'liFE'**

    ### PathResourceID

- **class psd\_tools.constants.PathResourceID(value, names=\<not given\>, \*values, module=None, qualname=None, type=None, start=1, boundary=None)**

  - **CLIPBOARD = 7**

    - **CLOSED\_KNOT\_LINKED = 1**

    - **CLOSED\_KNOT\_UNLINKED = 2**

    - **CLOSED\_LENGTH = 0**

    - **INITIAL\_FILL = 8**

    - **OPEN\_KNOT\_LINKED = 4**

    - **OPEN\_KNOT\_UNLINKED = 5**

    - **OPEN\_LENGTH = 3**

    - **PATH\_FILL = 6**

    ### PlacedLayerType

- **class psd\_tools.constants.PlacedLayerType(value, names=\<not given\>, \*values, module=None, qualname=None, type=None, start=1, boundary=None)**

  - **IMAGE\_STACK = 3**

    - **RASTER = 2**

    - **UNKNOWN = 0**

    - **VECTOR = 1**

    ### PrintScaleStyle

- **class psd\_tools.constants.PrintScaleStyle(value, names=\<not given\>, \*values, module=None, qualname=None, type=None, start=1, boundary=None)**

  Print scale style.

  - **CENTERED = 0**

    - **SIZE\_TO\_FIT = 1**

    - **USER\_DEFINED = 2**

    ### Resource

- **class psd\_tools.constants.Resource(value, names=\<not given\>, \*values, module=None, qualname=None, type=None, start=1, boundary=None)**

  Image resource keys.

  Note the following is not defined for performance reasons.

  - •

    PATH\_INFO\_10 to PATH\_INFO\_989 corresponding to 2010 - 2989

  - •

    - **PLUGIN\_RESOURCES\_10 to PLUGIN\_RESOURCES\_989 corresponding to**

      4010 - 4989

  - **ALPHA\_IDENTIFIERS = 1053**

    - **ALPHA\_NAMES\_PASCAL = 1006**

    - **ALPHA\_NAMES\_UNICODE = 1045**

    - **ALTERNATE\_DUOTONE\_COLORS = 1066**

    - **ALTERNATE\_SPOT\_COLORS = 1067**

    - **AUTO\_SAVE\_FILE\_PATH = 1086**

    - **AUTO\_SAVE\_FORMAT = 1087**

    - **BACKGROUND\_COLOR = 1010**

    - **BORDER\_INFO = 1009**

    - **CAPTION\_DIGEST = 1061**

    - **CAPTION\_PASCAL = 1008**

    - **CLIPPING\_PATH\_NAME = 2999**

    - **COLOR\_HALFTONING\_INFO = 1013**

    - **COLOR\_SAMPLERS\_RESOURCE = 1073**

    - **COLOR\_SAMPLERS\_RESOURCE\_OBSOLETE = 1038**

    - **COLOR\_TRANSFER\_FUNCTION = 1016**

    - **COPYRIGHT\_FLAG = 1034**

    - **COUNT\_INFO = 1080**

    - **DISPLAY\_INFO = 1077**

    - **DISPLAY\_INFO\_OBSOLETE = 1007**

    - **DUOTONE\_HALFTONING\_INFO = 1014**

    - **DUOTONE\_IMAGE\_INFO = 1018**

    - **DUOTONE\_TRANSFER\_FUNCTION = 1017**

    - **EFFECTIVE\_BW = 1019**

    - **EFFECTS\_VISIBLE = 1042**

    - **EPS\_OPTIONS = 1021**

    - **EXIF\_DATA\_1 = 1058**

    - **EXIF\_DATA\_3 = 1059**

    - **GLOBAL\_ALTITUDE = 1049**

    - **GLOBAL\_ANGLE = 1037**

    - **GRAYSCALE\_HALFTONING\_INFO = 1012**

    - **GRAYSCALE\_TRANSFER\_FUNCTION = 1015**

    - **GRID\_AND\_GUIDES\_INFO = 1032**

    - **HDR\_TONING\_INFO = 1070**

    - **ICC\_PROFILE = 1039**

    - **ICC\_UNTAGGED\_PROFILE = 1041**

    - **IDS\_SEED\_NUMBER = 1044**

    - **IMAGE\_MODE\_RAW = 1029**

    - **IMAGE\_READY\_7\_ROLLOVER\_EXPANDED\_STATE = 7003**

    - **IMAGE\_READY\_DATA\_SETS = 7001**

    - **IMAGE\_READY\_DEFAULT\_SELECTED\_STATE = 7002**

    - **IMAGE\_READY\_ROLLOVER\_EXPANDED\_STATE = 7004**

    - **IMAGE\_READY\_SAVE\_LAYER\_SETTINGS = 7005**

    - **IMAGE\_READY\_VARIABLES = 7000**

    - **IMAGE\_READY\_VERSION = 7006**

    - **INDEXED\_COLOR\_TABLE\_COUNT = 1046**

    - **IPTC\_NAA = 1028**

    - **JPEG\_QUALITY = 1030**

    - **JUMP\_TO\_XPEP = 1052**

    - **LAYER\_COMPS = 1065**

    - **LAYER\_GROUPS\_ENABLED\_ID = 1072**

    - **LAYER\_GROUP\_INFO = 1026**

    - **LAYER\_SELECTION\_IDS = 1069**

    - **LAYER\_STATE\_INFO = 1024**

    - **LIGHTROOM\_WORKFLOW = 8000**

    - **MAC\_NSPRINTINFO = 1084**

    - **MAC\_PAGE\_FORMAT\_INFO = 1002**

    - **MAC\_PRINT\_MANAGER\_INFO = 1001**

    - **MEASUREMENT\_SCALE = 1074**

    - **OBSOLETE1 = 1000**

    - **OBSOLETE2 = 1003**

    - **OBSOLETE3 = 1020**

    - **OBSOLETE4 = 1023**

    - **OBSOLETE5 = 1027**

    - **ONION\_SKINS = 1078**

    - **ORIGIN\_PATH\_INFO = 3000**

    - **PATH\_INFO\_0 = 2000**

    - **PATH\_INFO\_1 = 2001**

    - **PATH\_INFO\_2 = 2002**

    - **PATH\_INFO\_3 = 2003**

    - **PATH\_INFO\_4 = 2004**

    - **PATH\_INFO\_5 = 2005**

    - **PATH\_INFO\_6 = 2006**

    - **PATH\_INFO\_7 = 2007**

    - **PATH\_INFO\_8 = 2008**

    - **PATH\_INFO\_9 = 2009**

    - **PATH\_INFO\_990 = 2990**

    - **PATH\_INFO\_991 = 2991**

    - **PATH\_INFO\_992 = 2992**

    - **PATH\_INFO\_993 = 2993**

    - **PATH\_INFO\_994 = 2994**

    - **PATH\_INFO\_995 = 2995**

    - **PATH\_INFO\_996 = 2996**

    - **PATH\_INFO\_997 = 2997**

    - **PATH\_SELECTION\_STATE = 1088**

    - **PIXEL\_ASPECT\_RATIO = 1064**

    - **PLUGIN\_RESOURCE\_0 = 4000**

    - **PLUGIN\_RESOURCE\_1 = 4001**

    - **PLUGIN\_RESOURCE\_2 = 4002**

    - **PLUGIN\_RESOURCE\_3 = 4003**

    - **PLUGIN\_RESOURCE\_4 = 4004**

    - **PLUGIN\_RESOURCE\_4990 = 4990**

    - **PLUGIN\_RESOURCE\_4991 = 4991**

    - **PLUGIN\_RESOURCE\_4992 = 4992**

    - **PLUGIN\_RESOURCE\_4993 = 4993**

    - **PLUGIN\_RESOURCE\_4994 = 4994**

    - **PLUGIN\_RESOURCE\_4995 = 4995**

    - **PLUGIN\_RESOURCE\_4996 = 4996**

    - **PLUGIN\_RESOURCE\_4997 = 4997**

    - **PLUGIN\_RESOURCE\_4998 = 4998**

    - **PLUGIN\_RESOURCE\_4999 = 4990**

    - **PLUGIN\_RESOURCE\_5 = 4005**

    - **PLUGIN\_RESOURCE\_6 = 4006**

    - **PLUGIN\_RESOURCE\_7 = 4007**

    - **PLUGIN\_RESOURCE\_8 = 4008**

    - **PLUGIN\_RESOURCE\_9 = 4009**

    - **PRINT\_FLAGS = 1011**

    - **PRINT\_FLAGS\_INFO = 10000**

    - **PRINT\_INFO\_CS2 = 1071**

    - **PRINT\_INFO\_CS5 = 1082**

    - **PRINT\_SCALE = 1062**

    - **PRINT\_STYLE = 1083**

    - **QUICK\_MASK\_INFO = 1022**

    - **RESOLUTION\_INFO = 1005**

    - **SHEET\_DISCLOSURE = 1076**

    - **SLICES = 1050**

    - **SPOT\_HALFTONE = 1043**

    - **THUMBNAIL\_RESOURCE = 1036**

    - **THUMBNAIL\_RESOURCE\_PS4 = 1033**

    - **TIMELINE\_INFO = 1075**

    - **TRANSPARENCY\_INDEX = 1047**

    - **URL = 1035**

    - **URL\_LIST = 1054**

    - **VERSION\_INFO = 1057**

    - **WATERMARK = 1040**

    - **WINDOWS\_DEVMODE = 1085**

    - **WORKFLOW\_URL = 1051**

    - **WORKING\_PATH = 1025**

    - **XMP\_METADATA = 1060**

    - **static is\_path\_info(value)**

    - **static is\_plugin\_resource(value)**

    ### SectionDivider

- **class psd\_tools.constants.SectionDivider(value, names=\<not given\>, \*values, module=None, qualname=None, type=None, start=1, boundary=None)**

  - **BOUNDING\_SECTION\_DIVIDER = 3**

    - **CLOSED\_FOLDER = 2**

    - **OPEN\_FOLDER = 1**

    - **OTHER = 0**

    ### Tag

- **class psd\_tools.constants.Tag(value, names=\<not given\>, \*values, module=None, qualname=None, type=None, start=1, boundary=None)**

  Tagged blocks keys.

  - **ALPHA = b'Alph'**

    - **ANIMATION\_EFFECTS = b'anFX'**

    - **ANNOTATIONS = b'Anno'**

    - **ARTBOARD\_DATA1 = b'artb'**

    - **ARTBOARD\_DATA2 = b'artd'**

    - **ARTBOARD\_DATA3 = b'abdd'**

    - **BLACK\_AND\_WHITE = b'blwh'**

    - **BLEND\_CLIPPING\_ELEMENTS = b'clbl'**

    - **BLEND\_FILL\_OPACITY = b'iOpa'**

    - **BLEND\_INTERIOR\_ELEMENTS = b'infx'**

    - **BRIGHTNESS\_AND\_CONTRAST = b'brit'**

    - **CHANNEL\_BLENDING\_RESTRICTIONS\_SETTING = b'brst'**

    - **CHANNEL\_MIXER = b'mixr'**

    - **COLOR\_BALANCE = b'blnc'**

    - **COLOR\_LOOKUP = b'clrL'**

    - **COMPOSITOR\_INFO = b'cinf'**

    - **CONTENT\_GENERATOR\_EXTRA\_DATA = b'CgEd'**

    - **CURVES = b'curv'**

    - **EFFECTS\_LAYER = b'lrFX'**

    - **EXPORT\_SETTING1 = b'extd'**

    - **EXPORT\_SETTING2 = b'extn'**

    - **EXPOSURE = b'expA'**

    - **FILTER\_EFFECTS1 = b'FXid'**

    - **FILTER\_EFFECTS2 = b'FEid'**

    - **FILTER\_EFFECTS3 = b'FELS'**

    - **FILTER\_MASK = b'FMsk'**

    - **FOREIGN\_EFFECT\_ID = b'ffxi'**

    - **FRAMED\_GROUP = b'frgb'**

    - **GRADIENT\_FILL\_SETTING = b'GdFl'**

    - **GRADIENT\_MAP = b'grdm'**

    - **HUE\_SATURATION = b'hue2'**

    - **HUE\_SATURATION\_V4 = b'hue '**

    - **INVERT = b'nvrt'**

    - **KNOCKOUT\_SETTING = b'knko'**

    - **LAYER = b'Layr'**

    - **LAYER\_16 = b'Lr16'**

    - **LAYER\_32 = b'Lr32'**

    - **LAYER\_ID = b'lyid'**

    - **LAYER\_MASK\_AS\_GLOBAL\_MASK = b'lmgm'**

    - **LAYER\_NAME\_SOURCE\_SETTING = b'lnsr'**

    - **LAYER\_VERSION = b'lyvr'**

    - **LEVELS = b'levl'**

    - **LINKED\_LAYER1 = b'lnkD'**

    - **LINKED\_LAYER2 = b'lnk2'**

    - **LINKED\_LAYER3 = b'lnk3'**

    - **LINKED\_LAYER\_EXTERNAL = b'lnkE'**

    - **METADATA\_SETTING = b'shmd'**

    - **NESTED\_SECTION\_DIVIDER\_SETTING = b'lsdk'**

    - **OBJECT\_BASED\_EFFECTS\_LAYER\_INFO = b'lfx2'**

    - **OBJECT\_BASED\_EFFECTS\_LAYER\_INFO\_V0 = b'lmfx'**

    - **OBJECT\_BASED\_EFFECTS\_LAYER\_INFO\_V1 = b'lfxs'**

    - **PATT = b'patt'**

    - **PATTERNS1 = b'Patt'**

    - **PATTERNS2 = b'Pat2'**

    - **PATTERNS3 = b'Pat3'**

    - **PATTERN\_DATA = b'shpa'**

    - **PATTERN\_FILL\_SETTING = b'PtFl'**

    - **PHOTO\_FILTER = b'phfl'**

    - **PIXEL\_SOURCE\_DATA1 = b'PxSc'**

    - **PIXEL\_SOURCE\_DATA2 = b'PxSD'**

    - **PLACED\_LAYER1 = b'plLd'**

    - **PLACED\_LAYER2 = b'PlLd'**

    - **POSTERIZE = b'post'**

    - **PROTECTED\_SETTING = b'lspf'**

    - **REFERENCE\_POINT = b'fxrp'**

    - **SAVING\_MERGED\_TRANSPARENCY = b'Mtrn'**

    - **SAVING\_MERGED\_TRANSPARENCY16 = b'Mt16'**

    - **SAVING\_MERGED\_TRANSPARENCY32 = b'Mt32'**

    - **SECTION\_DIVIDER\_SETTING = b'lsct'**

    - **SELECTIVE\_COLOR = b'selc'**

    - **SHEET\_COLOR\_SETTING = b'lclr'**

    - **SMART\_OBJECT\_LAYER\_DATA1 = b'SoLd'**

    - **SMART\_OBJECT\_LAYER\_DATA2 = b'SoLE'**

    - **SOLID\_COLOR\_SHEET\_SETTING = b'SoCo'**

    - **TEXT\_ENGINE\_DATA = b'Txt2'**

    - **THRESHOLD = b'thrs'**

    - **TRANSPARENCY\_SHAPES\_LAYER = b'tsly'**

    - **TYPE\_TOOL\_INFO = b'tySh'**

    - **TYPE\_TOOL\_OBJECT\_SETTING = b'TySh'**

    - **UNICODE\_LAYER\_NAME = b'luni'**

    - **UNICODE\_PATH\_NAME = b'pths'**

    - **USER\_MASK = b'LMsk'**

    - **USING\_ALIGNED\_RENDERING = b'sn2P'**

    - **VECTOR\_MASK\_AS\_GLOBAL\_MASK = b'vmgm'**

    - **VECTOR\_MASK\_SETTING1 = b'vmsk'**

    - **VECTOR\_MASK\_SETTING2 = b'vsms'**

    - **VECTOR\_ORIGINATION\_DATA = b'vogk'**

    - **VECTOR\_ORIGINATION\_UNKNOWN = b'vowv'**

    - **VECTOR\_STROKE\_CONTENT\_DATA = b'vscg'**

    - **VECTOR\_STROKE\_DATA = b'vstk'**

    - **VIBRANCE = b'vibA'**

    ### TextType

- **class psd\_tools.constants.TextType(value, names=\<not given\>, \*values, module=None, qualname=None, type=None, start=1, boundary=None)**

  Type of text

  - **PARAGRAPH = 1**

    - **POINT = 0**

    ### psd\_tools.psd

Low-level API that translates binary data to Python structure.

All the data structure in this subpackage inherits from one of the object defined in *psd\_tools.psd.base* module.

### PSD

- **class psd\_tools.psd.PSD(header=NOTHING, color\_mode\_data=NOTHING, image\_resources=NOTHING, layer\_and\_mask\_information=NOTHING, image\_data=NOTHING)**

  Low-level PSD file structure that resembles the *specification*.

  Example:

  ```
  from psd_tools.psd import PSD
  with open(input_file, 'rb') as f:
      psd = PSD.read(f)
  with open(output_file, 'wb') as f:
      psd.write(f)
  ```

  - **header**

    See *FileHeader*.

  - **color\_mode\_data**

    See *ColorModeData*.

  - **image\_resources**

    See *ImageResources*.

  - **layer\_and\_mask\_information**

    See *LayerAndMaskInformation*.

  - **image\_data**

    See *ImageData*.

### psd\_tools.psd.base

Base data structures intended for inheritance.

All the data objects in this subpackage inherit from the base classes here. That means, all the data structures in the *psd\_tools.psd* subpackage implements the methods of **BaseElement** for serialization and decoding.

Objects that inherit from the **BaseElement** typically gets *attrs* decoration to have data fields.

### BaseElement

- **class psd\_tools.psd.base.BaseElement**

  Base element of various PSD file structs. All the data objects in *psd\_tools.psd* subpackage inherit from this class.

  - **classmethod read(cls, fp)**

    Read the element from a file-like object.

  - **write(self, fp)**

    Write the element to a file-like object.

  - **classmethod frombytes(self, data, \*args, \*\*kwargs)**

    Read the element from bytes.

  - **tobytes(self, \*args, \*\*kwargs)**

    Write the element to bytes.

  - **validate(self)**

    Validate the attribute.

### EmptyElement

- **class psd\_tools.psd.base.EmptyElement**

  Empty element that does not have a value.

### ValueElement

- **class psd\_tools.psd.base.ValueElement(value=None)**

  Single value wrapper that has a *value* attribute.

  Pretty printing shows the internal value by default. Inherit with *@attr.s(repr=False)* decorator to keep this behavior.

  - **value**

    Internal value.

### NumericElement

- **class psd\_tools.psd.base.NumericElement(value=0.0)**

  Single value element that has a numeric *value* attribute.

### IntegerElement

- **class psd\_tools.psd.base.IntegerElement(value=0)**

  Single integer value element that has a *value* attribute.

  Use with *@attr.s(repr=False)* decorator.

### ShortIntegerElement

- **class psd\_tools.psd.base.ShortIntegerElement(value=0)**

  Single short integer element that has a *value* attribute.

  Use with *@attr.s(repr=False)* decorator.

### ByteElement

- **class psd\_tools.psd.base.ByteElement(value=0)**

  Single 1-byte integer element that has a *value* attribute.

  Use with *@attr.s(repr=False)* decorator.

### BooleanElement

- **class psd\_tools.psd.base.BooleanElement(value=False)**

  Single bool value element that has a *value* attribute.

  Use with *@attr.s(repr=False)* decorator.

### StringElement

- **class psd\_tools.psd.base.StringElement(value: str = '')**

  Single unicode string.

  - **value**

    *str* value

### ListElement

- **class psd\_tools.psd.base.ListElement(items=NOTHING)**

  List-like element that has *items* list.

### DictElement

- **class psd\_tools.psd.base.DictElement(items=NOTHING)**

  Dict-like element that has *items* OrderedDict.

### psd\_tools.psd.color\_mode\_data

Color mode data structure.

### ColorModeData

- **class psd\_tools.psd.color\_mode\_data.ColorModeData(value: bytes = b'')**

  Color mode data section of the PSD file.

  For indexed color images the data is the color table for the image in a non-interleaved order.

  Duotone images also have this data, but the data format is undocumented.

  - **interleave()**

    Returns interleaved color table in bytes.

### psd\_tools.psd.descriptor

Descriptor data structure.

Descriptors are basic data structure used throughout PSD files. Descriptor is one kind of serialization protocol for data objects, and enum classes in *psd\_tools.terminology* or bytes indicates what kind of descriptor it is.

The class ID can be pre-defined enum if the tag is 4-byte length or plain bytes if the length is arbitrary. They depend on the internal version of Adobe Photoshop but the detail is unknown.

Pretty printing is the best approach to check the descriptor content:

```
from IPython.pretty import pprint
pprint(descriptor)
```

### Alias

- **class psd\_tools.psd.descriptor.Alias(value: bytes = b'\\x00\\x00\\x00\\x00')**

  Alias structure equivalent to *RawData*.

### Bool

- **class psd\_tools.psd.descriptor.Bool(value=False)**

  Bool structure.

  - **value**

    *bool* value

### Class

- **class psd\_tools.psd.descriptor.Class(name: str = '', classID: bytes = b'\\x00\\x00\\x00\\x00')**

  Class structure.

  - **name**

    *str* value

  - **classID**

    bytes in *Klass*

### Class1

- **class psd\_tools.psd.descriptor.Class1(name: str = '', classID: bytes = b'\\x00\\x00\\x00\\x00')**

  Class structure equivalent to *Class*.

### Class2

- **class psd\_tools.psd.descriptor.Class2(name: str = '', classID: bytes = b'\\x00\\x00\\x00\\x00')**

  Class structure equivalent to *Class*.

### Class3

- **class psd\_tools.psd.descriptor.Class3(name: str = '', classID: bytes = b'\\x00\\x00\\x00\\x00')**

  Class structure equivalent to *Class*.

### Descriptor

- **class psd\_tools.psd.descriptor.Descriptor(items=NOTHING, name: str = '', classID=b'null')**

  Dict-like descriptor structure.

  Key values can be 4-character *bytes* in *Key* or arbitrary length *bytes*. Supports direct access by *Key*.

  Example:

  ```
  from psd_tools.terminology import Key
  descriptor[Key.Enabled]
  for key in descriptor:
      print(descriptor[key])
  ```

  - **name**

    *str*

  - **classID**

    bytes in *Klass*

### Double

- **class psd\_tools.psd.descriptor.Double(value=0.0)**

  Double structure.

  - **value**

    *float* value

### Enumerated

- **class psd\_tools.psd.descriptor.Enumerated(typeID: bytes = b'\\x00\\x00\\x00\\x00', enum: bytes = b'\\x00\\x00\\x00\\x00')**

  Enum structure.

  - **typeID**

    bytes in *Type*

  - **enum**

    bytes in *Enum*

  - **get\_name()**

    Get enum name.

### EnumeratedReference

- **class psd\_tools.psd.descriptor.EnumeratedReference(name: str = '', classID: bytes = b'\\x00\\x00\\x00\\x00', typeID: bytes = b'\\x00\\x00\\x00\\x00', enum: bytes = b'\\x00\\x00\\x00\\x00')**

  Enumerated reference structure.

  - **name**

    *str* value

  - **classID**

    bytes in *Klass*

  - **typeID**

    bytes in *Type*

  - **enum**

    bytes in *Enum*

### GlobalObject

- **class psd\_tools.psd.descriptor.GlobalObject(items=NOTHING, name: str = '', classID=b'null')**

  Global object structure equivalent to *Descriptor*.

### Identifier

- **class psd\_tools.psd.descriptor.Identifier(value=0)**

  Identifier equivalent to *Integer*.

### Index

- **class psd\_tools.psd.descriptor.Index(value=0)**

  Index equivalent to *Integer*.

### Integer

- **class psd\_tools.psd.descriptor.Integer(value=0)**

  Integer structure.

  - **value**

    *int* value

### LargeInteger

- **class psd\_tools.psd.descriptor.LargeInteger(value=0)**

  LargeInteger structure.

  - **value**

    *int* value

### List

- **class psd\_tools.psd.descriptor.List(items=NOTHING)**

  List structure.

  Example:

  ```
  for item in list_value:
      print(item)
  ```

### Name

- **class psd\_tools.psd.descriptor.Name(name: str = '', classID: bytes = b'\\x00\\x00\\x00\\x00', value: str = '')**

  Name structure (Undocumented).

  - **name**

    str

  - **classID**

    bytes in *Klass*

  - **value**

    str

### ObjectArray

- **class psd\_tools.psd.descriptor.ObjectArray(items=NOTHING, items\_count: int = 0, name: str = '', classID=b'null')**

  Object array structure almost equivalent to *Descriptor*.

  - **items\_count**

    *int* value

  - **name**

    *str* value

  - **classID**

    bytes in *Klass*

### Property

- **class psd\_tools.psd.descriptor.Property(name: str = '', classID: bytes = b'\\x00\\x00\\x00\\x00', keyID: bytes = b'\\x00\\x00\\x00\\x00')**

  Property structure.

  - **name**

    *str* value

  - **classID**

    bytes in *Klass*

  - **keyID**

    bytes in *Key*

### Offset

- **class psd\_tools.psd.descriptor.Offset(name: str = '', classID: bytes = b'\\x00\\x00\\x00\\x00', value=0)**

  Offset structure.

  - **name**

    *str* value

  - **classID**

    bytes in *Klass*

  - **value**

    *int* value

### Path

- **class psd\_tools.psd.descriptor.Path(value: bytes = b'\\x00\\x00\\x00\\x00')**

  Undocumented path structure equivalent to *RawData*.

### RawData

- **class psd\_tools.psd.descriptor.RawData(value: bytes = b'\\x00\\x00\\x00\\x00')**

  RawData structure.

  - **value**

    *bytes* value

### Reference

- **class psd\_tools.psd.descriptor.Reference(items=NOTHING)**

  Reference structure equivalent to *List*.

### String

- **class psd\_tools.psd.descriptor.String(value: str = '')**

  String structure.

  - **value**

    *str* value

### UnitFloat

- **class psd\_tools.psd.descriptor.UnitFloat(value: float = 0.0, unit=Unit.\_None)**

  Unit float structure.

  - **unit**

    unit of the value in **Unit** or **Enum**

  - **value**

    *float* value

### UnitFloats

- **class psd\_tools.psd.descriptor.UnitFloats(unit=Unit.\_None, values=NOTHING)**

  Unit floats structure.

  - **unit**

    unit of the value in **Unit** or **Enum**

  - **values**

    List of *float* values

### psd\_tools.psd.engine\_data

EngineData structure.

PSD file embeds text formatting data in its own markup language referred EngineData. The format looks like the following:

```
<<
  /EngineDict
  <<
    /Editor
    <<
      /Text (˛ˇMake a change and save.)
    >>
  >>
  /Font
  <<
    /Name (˛ˇHelveticaNeue-Light)
    /FillColor
    <<
      /Type 1
      /Values [ 1.0 0.0 0.0 0.0 ]
    >>
    /StyleSheetSet [
    <<
      /Name (˛ˇNormal RGB)
    >>
    ]
  >>
>>
```

### EngineData

- **class psd\_tools.psd.engine\_data.EngineData(items=NOTHING)**

  Dict-like element.

  TYPE\_TOOL\_OBJECT\_SETTING tagged block contains this object in its descriptor.

### EngineData2

- **class psd\_tools.psd.engine\_data.EngineData2(items=NOTHING)**

  Dict-like element.

  TEXT\_ENGINE\_DATA tagged block has this object.

### Bool

- **class psd\_tools.psd.engine\_data.Bool(value=False)**

  Bool element.

### Dict

- **class psd\_tools.psd.engine\_data.Dict(items=NOTHING)**

  Dict-like element.

### Float

- **class psd\_tools.psd.engine\_data.Float(value=0.0)**

  Float element.

### Integer

- **class psd\_tools.psd.engine\_data.Integer(value=0)**

  Integer element.

### List

- **class psd\_tools.psd.engine\_data.List(items=NOTHING)**

  List-like element.

### Property

- **class psd\_tools.psd.engine\_data.Property(value=None)**

  Property element.

### String

- **class psd\_tools.psd.engine\_data.String(value=None)**

  String element.

### psd\_tools.psd.effects\_layer

Effects layer structure.

Note the structures in this module is obsolete and object-based layer effects are stored in tagged blocks.

### EffectsLayer

- **class psd\_tools.psd.effects\_layer.EffectsLayer(items=NOTHING, version: int = 0)**

  Dict-like EffectsLayer structure. See *psd\_tools.constants.EffectOSType* for available keys.

  - **version**

    ### CommonStateInfo

- **class psd\_tools.psd.effects\_layer.CommonStateInfo(version: int = 0, visible: int = 1)**

  Effects layer common state info.

  - **version**

    - **visible**

    ### ShadowInfo

- **class psd\_tools.psd.effects\_layer.ShadowInfo(version: int = 0, blur: int = 0, intensity: int = 0, angle: int = 0, distance: int = 0, color=NOTHING, blend\_mode=BlendMode.NORMAL, enabled: int = 0, use\_global\_angle: int = 0, opacity: int = 0, native\_color=NOTHING)**

  Effects layer shadow info.

  - **version**

    - **blur**

    - **intensity**

    - **angle**

    - **distance**

    - **color**

    - **blend\_mode**

    - **enabled**

    - **use\_global\_angle**

    - **opacity**

    - **native\_color**

    ### OuterGlowInfo

- **class psd\_tools.psd.effects\_layer.OuterGlowInfo(version: int = 0, blur: int = 0, intensity: int = 0, color=NOTHING, blend\_mode=BlendMode.NORMAL, enabled: int = 0, opacity: int = 0, native\_color=None)**

  Effects layer outer glow info.

  - **version**

    - **blur**

    - **intensity**

    - **color**

    - **blend\_mode**

    - **enabled**

    - **opacity**

    - **native\_color**

    ### InnerGlowInfo

- **class psd\_tools.psd.effects\_layer.InnerGlowInfo(version: int = 0, blur: int = 0, intensity: int = 0, color=NOTHING, blend\_mode=BlendMode.NORMAL, enabled: int = 0, opacity: int = 0, invert=None, native\_color=None)**

  Effects layer inner glow info.

  - **version**

    - **blur**

    - **intensity**

    - **color**

    - **blend\_mode**

    - **enabled**

    - **opacity**

    - **invert**

    - **native\_color**

    ### BevelInfo

- **class psd\_tools.psd.effects\_layer.BevelInfo(version: int = 0, angle: int = 0, depth: int = 0, blur: int = 0, highlight\_blend\_mode=BlendMode.NORMAL, shadow\_blend\_mode=BlendMode.NORMAL, highlight\_color=NOTHING, shadow\_color=NOTHING, bevel\_style: int = 0, highlight\_opacity: int = 0, shadow\_opacity: int = 0, enabled: int = 0, use\_global\_angle: int = 0, direction: int = 0, real\_highlight\_color=None, real\_shadow\_color=None)**

  Effects layer bevel info.

  - **version**

    - **angle**

    - **depth**

    - **blur**

    - **highlight\_blend\_mode**

    - **shadow\_blend\_mode**

    - **highlight\_color**

    - **shadow\_color**

    - **highlight\_opacity**

    - **shadow\_opacity**

    - **enabled**

    - **use\_global\_angle**

    - **direction**

    - **real\_hightlight\_color**

    - **real\_shadow\_color**

    ### SolidFillInfo

- **class psd\_tools.psd.effects\_layer.SolidFillInfo(version: int = 2, blend\_mode=BlendMode.NORMAL, color=NOTHING, opacity: int = 0, enabled: int = 0, native\_color=NOTHING)**

  Effects layer inner glow info.

  - **version**

    - **blend\_mode**

    - **color**

    - **opacity**

    - **enabled**

    - **native\_color**

    ### psd\_tools.psd.filter\_effects

Filter effects structure.

### FilterEffects

- **class psd\_tools.psd.filter\_effects.FilterEffects(items=NOTHING, version: int = 1)**

  List-like FilterEffects structure. See *FilterEffect*.

  - **version**

    ### FilterEffect

- **class psd\_tools.psd.filter\_effects.FilterEffect(uuid=None, version=None, rectangle=None, depth=None, max\_channels=None, channels=None, extra=None)**

  FilterEffect structure.

  - **uuid**

    - **version**

    - **rectangle**

    - **depth**

    - **max\_channels**

    - **channels**

    List of *FilterEffectChannel*.

  - **extra**

    See *FilterEffectExtra*.

### FilterEffectChannel

- **class psd\_tools.psd.filter\_effects.FilterEffectChannel(is\_written=0, compression=None, data=b'')**

  FilterEffectChannel structure.

  - **is\_written**

    - **compression**

    - **data**

    ### FilterEffectExtra

- **class psd\_tools.psd.filter\_effects.FilterEffectExtra(is\_written=0, rectangle=NOTHING, compression: int = 0, data: bytes = b'')**

  FilterEffectExtra structure.

  - **is\_written**

    - **rectangle**

    - **compression**

    - **data**

    ### psd\_tools.psd.header

File header structure.

### FileHeader

- **class psd\_tools.psd.header.FileHeader(signature: bytes = b'8BPS', version: int = 1, channels: int = 4, height: int = 64, width: int = 64, depth: int = 8, color\_mode=ColorMode.RGB)**

  Header section of the PSD file.

  Example:

  ```
  from psd_tools.psd.header import FileHeader
  from psd_tools.constants import ColorMode
  header = FileHeader(channels=2, height=359, width=400, depth=8,
                      color_mode=ColorMode.GRAYSCALE)
  ```

  - **signature**

    Signature: always equal to **b'8BPS'**.

  - **version**

    Version number. PSD is 1, and PSB is 2.

  - **channels**

    The number of channels in the image, including any user-defined alpha channel.

  - **height**

    The height of the image in pixels.

  - **width**

    The width of the image in pixels.

  - **depth**

    The number of bits per channel.

  - **color\_mode**

    The color mode of the file. See *ColorMode*

### psd\_tools.psd.image\_data

Image data section structure.

*ImageData* corresponds to the last section of the PSD/PSB file where a composited image is stored. When the file does not contain layers, this is the only place pixels are saved.

### ImageData

- **class psd\_tools.psd.image\_data.ImageData(compression=Compression.RAW, data: bytes = b'')**

  Merged channel image data.

  - **compression**

    See *Compression*.

  - **data**

    *bytes* as compressed in the *compression* flag.

  - **get\_data(header, split=True)**

    Get decompressed data.

    - **Parameters**

      **header** -- See *FileHeader*.

    - **Returns**

      *list* of bytes corresponding each channel.

  - **classmethod new(header, color=0, compression=Compression.RAW)**

    Create a new image data object.

    - **Parameters**

      - •

        **header** -- FileHeader.

      - •

        **compression** -- compression type.

      - •

        **color** -- default color. int or iterable for channel length.

  - **set\_data(data, header)**

    Set raw data and compress.

    - **Parameters**

      - •

        **data** -- list of raw data bytes corresponding channels.

      - •

        **compression** -- compression type, see *Compression*.

      - •

        **header** -- See *FileHeader*.

    - **Returns**

      length of compressed data.

### psd\_tools.psd.image\_resources

Image resources section structure. Image resources are used to store non-pixel data associated with images, such as pen tool paths or slices.

See *Resource* to check available resource names.

Example:

```
from psd_tools.constants import Resource
version_info = psd.image_resources.get_data(Resource.VERSION_INFO)
```

The following resources are plain bytes:

```
Resource.OBSOLETE1: 1000
Resource.MAC_PRINT_MANAGER_INFO: 1001
Resource.MAC_PAGE_FORMAT_INFO: 1002
Resource.OBSOLETE2: 1003
Resource.DISPLAY_INFO_OBSOLETE: 1007
Resource.BORDER_INFO: 1009
Resource.DUOTONE_IMAGE_INFO: 1018
Resource.EFFECTIVE_BW: 1019
Resource.OBSOLETE3: 1020
Resource.EPS_OPTIONS: 1021
Resource.QUICK_MASK_INFO: 1022
Resource.OBSOLETE4: 1023
Resource.WORKING_PATH: 1025
Resource.OBSOLETE5: 1027
Resource.IPTC_NAA: 1028
Resource.IMAGE_MODE_RAW: 1029
Resource.JPEG_QUALITY: 1030
Resource.URL: 1035
Resource.COLOR_SAMPLERS_RESOURCE_OBSOLETE: 1038
Resource.ICC_PROFILE: 1039
Resource.SPOT_HALFTONE: 1043
Resource.JUMP_TO_XPEP: 1052
Resource.EXIF_DATA_1: 1058
Resource.EXIF_DATA_3: 1059
Resource.XMP_METADATA: 1060
Resource.CAPTION_DIGEST: 1061
Resource.ALTERNATE_DUOTONE_COLORS: 1066
Resource.ALTERNATE_SPOT_COLORS: 1067
Resource.HDR_TONING_INFO: 1070
Resource.PRINT_INFO_CS2: 1071
Resource.COLOR_SAMPLERS_RESOURCE: 1073
Resource.DISPLAY_INFO: 1077
Resource.MAC_NSPRINTINFO: 1084
Resource.WINDOWS_DEVMODE: 1085
Resource.PATH_INFO_N: 2000-2999
Resource.PLUGIN_RESOURCES_N: 4000-4999
Resource.IMAGE_READY_VARIABLES: 7000
Resource.IMAGE_READY_DATA_SETS: 7001
Resource.IMAGE_READY_DEFAULT_SELECTED_STATE: 7002
Resource.IMAGE_READY_7_ROLLOVER_EXPANDED_STATE: 7003
Resource.IMAGE_READY_ROLLOVER_EXPANDED_STATE: 7004
Resource.IMAGE_READY_SAVE_LAYER_SETTINGS: 7005
Resource.IMAGE_READY_VERSION: 7006
Resource.LIGHTROOM_WORKFLOW: 8000
```

### ImageResources

- **class psd\_tools.psd.image\_resources.ImageResources(items=NOTHING)**

  Image resources section of the PSD file. Dict of *ImageResource*.

  - **get\_data(key, default=None)**

    Get data from the image resources.

    Shortcut for the following:

    ```
    if key in image_resources:
        value = tagged_blocks[key].data
    ```

  - **classmethod new(\*\*kwargs)**

    Create a new default image resouces.

    - **Returns**

      ImageResources

### ImageResource

- **class psd\_tools.psd.image\_resources.ImageResource(signature: bytes = b'8BIM', key: int = 1000, name: str = '', data: bytes = b'')**

  Image resource block.

  - **signature**

    Binary signature, always **b'8BIM'**.

  - **key**

    Unique identifier for the resource. See *Resource*.

  - **name**

    - **data**

    The resource data.

### AlphaIdentifiers

- **class psd\_tools.psd.image\_resources.AlphaIdentifiers(items=NOTHING)**

  List of alpha identifiers.

### AlphaNamesPascal

- **class psd\_tools.psd.image\_resources.AlphaNamesPascal(items=NOTHING)**

  List of alpha names.

### AlphaNamesUnicode

- **class psd\_tools.psd.image\_resources.AlphaNamesUnicode(items=NOTHING)**

  List of alpha names.

### Byte

- **class psd\_tools.psd.image\_resources.Byte(value=0)**

  Byte element.

### GridGuidesInfo

- **class psd\_tools.psd.image\_resources.GridGuidesInfo(version: int = 1, horizontal: int = 0, vertical: int = 0, data=NOTHING)**

  Grid and guides info structure.

### HalftoneScreens

- **class psd\_tools.psd.image\_resources.HalftoneScreens(items=NOTHING)**

  Halftone screens.

### HalftoneScreen

- **class psd\_tools.psd.image\_resources.HalftoneScreen(freq: int = 0, unit: int = 0, angle: int = 0, shape: int = 0, use\_accurate: bool = False, use\_printer: bool = False)**

  Halftone screen.

  - **freq**

    - **unit**

    - **angle**

    - **shape**

    - **use\_accurate**

    - **use\_printer**

    ### Integer

- **class psd\_tools.psd.image\_resources.Integer(value=0)**

  Integer element.

### LayerGroupEnabledIDs

- **class psd\_tools.psd.image\_resources.LayerGroupEnabledIDs(items=NOTHING)**

  Layer group enabled ids.

### LayerGroupInfo

- **class psd\_tools.psd.image\_resources.LayerGroupInfo(items=NOTHING)**

  Layer group info list.

### LayerSelectionIDs

- **class psd\_tools.psd.image\_resources.LayerSelectionIDs(items=NOTHING)**

  Layer selection ids.

### ShortInteger

- **class psd\_tools.psd.image\_resources.ShortInteger(value=0)**

  Short integer element.

### PascalString

- **class psd\_tools.psd.image\_resources.PascalString(value=None)**

  Pascal string element.

### PixelAspectRatio

- **class psd\_tools.psd.image\_resources.PixelAspectRatio(value=0.0, version: int = 1)**

  Pixel aspect ratio.

### PrintFlags

- **class psd\_tools.psd.image\_resources.PrintFlags(labels: bool = False, crop\_marks: bool = False, colorbars: bool = False, registration\_marks: bool = False, negative: bool = False, flip: bool = False, interpolate: bool = False, caption: bool = False, print\_flags=None)**

  Print flags.

### PrintFlagsInfo

- **class psd\_tools.psd.image\_resources.PrintFlagsInfo(version: int = 0, center\_crop: int = 0, bleed\_width\_value: int = 0, bleed\_width\_scale: int = 0)**

  Print flags info structure.

  - **version**

    - **center\_crop**

    - **bleed\_width\_value**

    - **bleed\_width\_scale**

    ### PrintScale

- **class psd\_tools.psd.image\_resources.PrintScale(style=PrintScaleStyle.CENTERED, x: float = 0.0, y: float = 0.0, scale: float = 0.0)**

  Print scale structure.

  - **style**

    - **x**

    - **y**

    - **scale**

    ### ResoulutionInfo

- **class psd\_tools.psd.image\_resources.ResoulutionInfo(horizontal: int = 0, horizontal\_unit: int = 0, width\_unit: int = 0, vertical: int = 0, vertical\_unit: int = 0, height\_unit: int = 0)**

  Resoulution info structure.

  - **horizontal**

    - **horizontal\_unit**

    - **width\_unit**

    - **vertical**

    - **vertical\_unit**

    - **height\_unit**

    ### Slices

- **class psd\_tools.psd.image\_resources.Slices(version: int = 0, data=None)**

  Slices resource.

  - **version**

    - **data**

    ### SlicesV6

- **class psd\_tools.psd.image\_resources.SlicesV6(bbox=NOTHING, name: str = '', items=NOTHING)**

  Slices resource version 6.

  - **bbox**

    - **name**

    - **items**

    ### SliceV6

- **class psd\_tools.psd.image\_resources.SliceV6(slice\_id: int = 0, group\_id: int = 0, origin: int = 0, associated\_id=None, name: str = '', slice\_type: int = 0, bbox=NOTHING, url: str = '', target: str = '', message: str = '', alt\_tag: str = '', cell\_is\_html: bool = False, cell\_text: str = '', horizontal\_align: int = 0, vertical\_align: int = 0, alpha: int = 0, red: int = 0, green: int = 0, blue: int = 0, data=None)**

  Slice element for version 6.

  - **slice\_id**

    - **group\_id**

    - **origin**

    - **associated\_id**

    - **name**

    - **slice\_type**

    - **bbox**

    - **url**

    - **target**

    - **message**

    - **alt\_tag**

    - **cell\_is\_html**

    - **cell\_text**

    - **horizontal**

    - **vertical**

    - **alpha**

    - **red**

    - **green**

    - **blue**

    - **data**

    ### ThumbnailResource

- **class psd\_tools.psd.image\_resources.ThumbnailResource(fmt: int = 0, width: int = 0, height: int = 0, row: int = 0, total\_size: int = 0, bits: int = 0, planes: int = 0, data: bytes = b'')**

  Thumbnail resource structure.

  - **fmt**

    - **width**

    - **height**

    - **row**

    - **total\_size**

    - **size**

    - **bits**

    - **planes**

    - **data**

    ### ThumbnailResourceV4

- **class psd\_tools.psd.image\_resources.ThumbnailResourceV4(fmt: int = 0, width: int = 0, height: int = 0, row: int = 0, total\_size: int = 0, bits: int = 0, planes: int = 0, data: bytes = b'')**

  ### TransferFunctions

- **class psd\_tools.psd.image\_resources.TransferFunctions(items=NOTHING)**

  Transfer functions.

### TransferFunction

- **class psd\_tools.psd.image\_resources.TransferFunction(curve=NOTHING, override: bool = False)**

  Transfer function

### URLList

- **class psd\_tools.psd.image\_resources.URLList(items=NOTHING)**

  URL list structure.

### URLItem

- **class psd\_tools.psd.image\_resources.URLItem(number: int = 0, id: int = 0, name: str = '')**

  URL item.

  - **number**

    - **id**

    - **name**

    ### VersionInfo

- **class psd\_tools.psd.image\_resources.VersionInfo(version: int = 1, has\_composite: bool = False, writer: str = '', reader: str = '', file\_version: int = 1)**

  Version info structure.

  - **version**

    - **has\_composite**

    - **writer**

    - **reader**

    - **file\_version**

    ### psd\_tools.psd.layer\_and\_mask

Layer and mask data structure.

### LayerAndMaskInformation

- **class psd\_tools.psd.layer\_and\_mask.LayerAndMaskInformation(layer\_info=None, global\_layer\_mask\_info=None, tagged\_blocks=None)**

  Layer and mask information section.

  - **layer\_info**

    See *LayerInfo*.

  - **global\_layer\_mask\_info**

    See *GlobalLayerMaskInfo*.

  - **tagged\_blocks**

    See *TaggedBlocks*.

### LayerInfo

- **class psd\_tools.psd.layer\_and\_mask.LayerInfo(layer\_count: int = 0, layer\_records=None, channel\_image\_data=None)**

  High-level organization of the layer information.

  - **layer\_count**

    Layer count. If it is a negative number, its absolute value is the number of layers and the first alpha channel contains the transparency data for the merged result.

  - **layer\_records**

    Information about each layer. See *LayerRecords*.

  - **channel\_image\_data**

    Channel image data. See *ChannelImageData*.

### GlobalLayerMaskInfo

- **class psd\_tools.psd.layer\_and\_mask.GlobalLayerMaskInfo(overlay\_color=None, opacity: int = 0, kind=GlobalLayerMaskKind.PER\_LAYER)**

  Global mask information.

  - **overlay\_color**

    Overlay color space (undocumented) and color components.

  - **opacity**

    Opacity. 0 = transparent, 100 = opaque.

  - **kind**

    Kind. 0 = Color selected--i.e. inverted; 1 = Color protected; 128 = use value stored per layer. This value is preferred. The others are for backward compatibility with beta versions.

### LayerRecords

- **class psd\_tools.psd.layer\_and\_mask.LayerRecords(items=NOTHING)**

  List of layer records. See *LayerRecord*.

### LayerRecord

- **class psd\_tools.psd.layer\_and\_mask.LayerRecord(top: int = 0, left: int = 0, bottom: int = 0, right: int = 0, channel\_info: list\[*ChannelInfo*\] = NOTHING, signature: bytes = b'8BIM', blend\_mode=BlendMode.NORMAL, opacity: int = 255, clipping=Clipping.BASE, flags=NOTHING, mask\_data=None, blending\_ranges=NOTHING, name: str = '', tagged\_blocks: *TaggedBlocks* = NOTHING)**

  Layer record.

  - **top**

    Top position.

  - **left**

    Left position.

  - **bottom**

    Bottom position.

  - **right**

    Right position.

  - **channel\_info**

    List of *ChannelInfo*.

  - **signature**

    Blend mode signature **b'8BIM'**.

  - **blend\_mode**

    Blend mode key. See *BlendMode*.

  - **opacity**

    Opacity, 0 = transparent, 255 = opaque.

  - **clipping**

    Clipping, 0 = base, 1 = non-base. See *Clipping*.

  - **flags**

    See *LayerFlags*.

  - **mask\_data**

    *MaskData* or None.

  - **blending\_ranges**

    See **LayerBlendingRanges**.

  - **name**

    Layer name.

  - **tagged\_blocks**

    See *TaggedBlocks*.

  - **property channel\_sizes**

    List of channel sizes: \[(width, height)\].

  - **property height**

    Height of the layer.

  - **property width**

    Width of the layer.

### LayerFlags

- **class psd\_tools.psd.layer\_and\_mask.LayerFlags(transparency\_protected: bool = False, visible: bool = True, obsolete: bool = False, photoshop\_v5\_later: bool = True, pixel\_data\_irrelevant: bool = False, undocumented\_1: bool = False, undocumented\_2: bool = False, undocumented\_3: bool = False)**

  Layer flags.

  Note there are undocumented flags. Maybe photoshop version.

  - **transparency\_protected**

    - **visible**

    - **pixel\_data\_irrelevant**

    ### LayerBlendingRanges

- **class psd\_tools.psd.layer\_and\_mask.LayerBlendingRanges(composite\_ranges=NOTHING, channel\_ranges=NOTHING)**

  Layer blending ranges.

  All ranges contain 2 black values followed by 2 white values.

  - **composite\_ranges**

    List of composite gray blend source and destination ranges.

  - **channel\_ranges**

    List of channel source and destination ranges.

### MaskData

- **class psd\_tools.psd.layer\_and\_mask.MaskData(top: int = 0, left: int = 0, bottom: int = 0, right: int = 0, background\_color: int = 0, flags=NOTHING, parameters=None, real\_flags=None, real\_background\_color=None, real\_top=None, real\_left=None, real\_bottom=None, real\_right=None)**

  Mask data.

  Real user mask is a final composite mask of vector and pixel masks.

  - **top**

    Top position.

  - **left**

    Left position.

  - **bottom**

    Bottom position.

  - **right**

    Right position.

  - **background\_color**

    Default color. 0 or 255.

  - **flags**

    See *MaskFlags*.

  - **parameters**

    *MaskParameters* or None.

  - **real\_flags**

    Real user mask flags. See *MaskFlags*.

  - **real\_background\_color**

    Real user mask background. 0 or 255.

  - **real\_top**

    Top position of real user mask.

  - **real\_left**

    Left position of real user mask.

  - **real\_bottom**

    Bottom position of real user mask.

  - **real\_right**

    Right position of real user mask.

  - **property height**

    Height of the mask.

  - **property real\_height**

    Height of real user mask.

  - **property real\_width**

    Width of real user mask.

  - **property width**

    Width of the mask.

### MaskFlags

- **class psd\_tools.psd.layer\_and\_mask.MaskFlags(pos\_relative\_to\_layer: bool = False, mask\_disabled: bool = False, invert\_mask: bool = False, user\_mask\_from\_render: bool = False, parameters\_applied: bool = False, undocumented\_1: bool = False, undocumented\_2: bool = False, undocumented\_3: bool = False)**

  Mask flags.

  - **pos\_relative\_to\_layer**

    Position relative to layer.

  - **mask\_disabled**

    Layer mask disabled.

  - **invert\_mask**

    Invert layer mask when blending (Obsolete).

  - **user\_mask\_from\_render**

    The user mask actually came from rendering other data.

  - **parameters\_applied**

    The user and/or vector masks have parameters applied to them.

### MaskParameters

- **class psd\_tools.psd.layer\_and\_mask.MaskParameters(user\_mask\_density=None, user\_mask\_feather=None, vector\_mask\_density=None, vector\_mask\_feather=None)**

  Mask parameters.

  - **user\_mask\_density**

    - **user\_mask\_feather**

    - **vector\_mask\_density**

    - **vector\_mask\_feather**

    ### ChannelInfo

- **class psd\_tools.psd.layer\_and\_mask.ChannelInfo(id=ChannelID.CHANNEL\_0, length: int = 0)**

  Channel information.

  - **id**

    Channel ID: 0 = red, 1 = green, etc.; -1 = transparency mask; -2 = user supplied layer mask, -3 real user supplied layer mask (when both a user mask and a vector mask are present). See *ChannelID*.

  - **length**

    Length of the corresponding channel data.

### ChannelImageData

- **class psd\_tools.psd.layer\_and\_mask.ChannelImageData(items=NOTHING)**

  List of channel data list.

  This size of this list corresponds to the size of *LayerRecords*. Each item corresponds to the channels of each layer.

  See *ChannelDataList*.

### ChannelDataList

- **class psd\_tools.psd.layer\_and\_mask.ChannelDataList(items=NOTHING)**

  List of channel image data, corresponding to each color or alpha.

  See *ChannelData*.

### ChannelData

- **class psd\_tools.psd.layer\_and\_mask.ChannelData(compression=Compression.RAW, data: bytes = b'')**

  Channel data.

  - **compression**

    Compression type. See *Compression*.

  - **data**

    Data.

  - **get\_data(width, height, depth, version=1)**

    Get decompressed channel data.

    - **Parameters**

      - •

        **width** -- width.

      - •

        **height** -- height.

      - •

        **depth** -- bit depth of the pixel.

      - •

        **version** -- psd file version.

    - **Return type**

      bytes

  - **set\_data(data, width, height, depth, version=1)**

    Set raw channel data and compress to store.

    - **Parameters**

      - •

        **data** -- raw data bytes to write.

      - •

        **compression** -- compression type, see *Compression*.

      - •

        **width** -- width.

      - •

        **height** -- height.

      - •

        **depth** -- bit depth of the pixel.

      - •

        **version** -- psd file version.

### psd\_tools.psd.linked\_layer

Linked layer structure.

### LinkedLayers

- **class psd\_tools.psd.linked\_layer.LinkedLayers(items=NOTHING)**

  List of LinkedLayer structure. See *LinkedLayer*.

### LinkedLayer

- **class psd\_tools.psd.linked\_layer.LinkedLayer(kind=LinkedLayerType.ALIAS, version=1, uuid: str = '', filename: str = '', filetype: bytes = b'\\x00\\x00\\x00\\x00', creator: bytes = b'\\x00\\x00\\x00\\x00', filesize=None, open\_file=None, linked\_file=None, timestamp=None, data=None, child\_id=None, mod\_time=None, lock\_state=None)**

  LinkedLayer structure.

  - **kind**

    - **version**

    - **uuid**

    - **filename**

    - **filetype**

    - **creator**

    - **filesize**

    - **open\_file**

    - **linked\_file**

    - **timestamp**

    - **data**

    - **child\_id**

    - **mod\_time**

    - **lock\_state**

    ### psd\_tools.psd.patterns

Patterns structure.

### Patterns

- **class psd\_tools.psd.patterns.Patterns(items=NOTHING)**

  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)**

  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)**

  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'')**

  VirtualMemoryArrayList structure, corresponding to each channel.

  - **is\_written**

    - **depth**

    - **rectangle**

    - **pixel\_depth**

    - **compression**

    - **data**

    - **get\_data()**

    Get decompressed bytes.

  - **set\_data(size, data, depth, compression=0)**

    Set bytes.

### psd\_tools.psd.tagged\_blocks

Tagged block data structure.

### Todo

Support the following tagged blocks: **Tag.PATTERN\_DATA**, **Tag.TYPE\_TOOL\_INFO**, **Tag.LAYER**, **Tag.ALPHA**

### TaggedBlocks

- **class psd\_tools.psd.tagged\_blocks.TaggedBlocks(items=NOTHING)**

  Dict of tagged block items.

  See *Tag* for available keys.

  Example:

  ```
  from psd_tools.constants import Tag
  # Iterate over fields
  for key in tagged_blocks:
      print(key)
  # Get a field
  value = tagged_blocks.get_data(Tag.TYPE_TOOL_OBJECT_SETTING)
  ```

### TaggedBlock

- **class psd\_tools.psd.tagged\_blocks.TaggedBlock(signature=b'8BIM', key=b'', data=b'')**

  Layer tagged block with extra info.

  - **key**

    4-character code. See *Tag*

  - **data**

    Data.

### Annotations

- **class psd\_tools.psd.tagged\_blocks.Annotations(items=NOTHING, major\_version: int = 2, minor\_version: int = 1)**

  List of Annotation, see :py:class: *.Annotation*.

  - **major\_version**

    - **minor\_version**

    ### Annotation

- **class psd\_tools.psd.tagged\_blocks.Annotation(kind: bytes = b'txtA', is\_open: int = 0, flags: int = 0, optional\_blocks: int = 1, icon\_location=NOTHING, popup\_location=NOTHING, color=NOTHING, author: str = '', name: str = '', mod\_date: str = '', marker: bytes = b'txtC', data: bytes = b'')**

  Annotation structure.

  - **kind**

    - **is\_open**

    ### Bytes

- **class psd\_tools.psd.tagged\_blocks.Bytes(value: bytes = b'\\x00\\x00\\x00\\x00')**

  Bytes structure.

  - **value**

    ### ChannelBlendingRestrictionsSetting

- **class psd\_tools.psd.tagged\_blocks.ChannelBlendingRestrictionsSetting(items=NOTHING)**

  ChannelBlendingRestrictionsSetting structure.

  List of restricted channel numbers (int).

### FilterMask

- **class psd\_tools.psd.tagged\_blocks.FilterMask(color=None, opacity: int = 0)**

  FilterMask structure.

  - **color**

    - **opacity**

    ### MetadataSettings

- **class psd\_tools.psd.tagged\_blocks.MetadataSettings(items=NOTHING)**

  MetadataSettings structure.

### MetadataSetting

- **class psd\_tools.psd.tagged\_blocks.MetadataSetting(signature: bytes = b'8BIM', key: bytes = b'', copy\_on\_sheet: bool = False, data: bytes = b'')**

  MetadataSetting structure.

### PixelSourceData2

- **class psd\_tools.psd.tagged\_blocks.PixelSourceData2(items=NOTHING)**

  PixelSourceData2 structure.

### PlacedLayerData

- **class psd\_tools.psd.tagged\_blocks.PlacedLayerData(kind: bytes = b'plcL', version: int = 3, uuid: bytes = b'', page: int = 0, total\_pages: int = 0, anti\_alias: int = 0, layer\_type=PlacedLayerType.UNKNOWN, transform: tuple = (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), warp=None)**

  PlacedLayerData structure.

### ProtectedSetting

- **class psd\_tools.psd.tagged\_blocks.ProtectedSetting(value=0)**

  ProtectedSetting structure.

### ReferencePoint

- **class psd\_tools.psd.tagged\_blocks.ReferencePoint(items=NOTHING)**

  ReferencePoint structure.

### SectionDividerSetting

- **class psd\_tools.psd.tagged\_blocks.SectionDividerSetting(kind=SectionDivider.OTHER, signature=None, blend\_mode=None, sub\_type=None)**

  SectionDividerSetting structure.

  - **kind**

    - **blend\_mode**

    - **sub\_type**

    ### SheetColorSetting

- **class psd\_tools.psd.tagged\_blocks.SheetColorSetting(value=SheetColorType.NO\_COLOR)**

  SheetColorSetting value.

  This setting represents color label in the layers panel in Photoshop UI.

  - **value**

    ### SmartObjectLayerData

- **class psd\_tools.psd.tagged\_blocks.SmartObjectLayerData(kind: bytes = b'soLD', version: int = 5, data: DescriptorBlock = None)**

  VersionedDescriptorBlock structure.

  - **kind**

    - **version**

    - **data**

    ### TypeToolObjectSetting

- **class psd\_tools.psd.tagged\_blocks.TypeToolObjectSetting(version: int = 1, transform: tuple = (0.0, 0.0, 0.0, 0.0, 0.0, 0.0), text\_version: int = 1, text\_data: DescriptorBlock = None, warp\_version: int = 1, warp: DescriptorBlock = None, left: int = 0, top: int = 0, right: int = 0, bottom: int = 0)**

  TypeToolObjectSetting structure.

  - **version**

    - **transform**

    Tuple of affine transform parameters (xx, xy, yx, yy, tx, ty).

  - **text\_version**

    - **text\_data**

    - **warp\_version**

    - **warp**

    - **left**

    - **top**

    - **right**

    - **bottom**

    ### UserMask

- **class psd\_tools.psd.tagged\_blocks.UserMask(color=None, opacity: int = 0, flag: int = 128)**

  UserMask structure.

  - **color**

    - **opacity**

    - **flag**

    ### psd\_tools.psd.vector

Vector mask, path, and stroke structure.

### Path

- **class psd\_tools.psd.vector.Path(items=NOTHING)**

  List-like Path structure. Elements are either PathFillRule, InitialFillRule, ClipboardRecord, ClosedPath, or OpenPath.

### Subpath

- **class psd\_tools.psd.vector.Subpath(items=NOTHING, operation: int = 1, unknown1: int = 1, unknown2: int = 0, index: int = 0, unknown3: bytes = b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00')**

  Subpath element. This is a list of Knot objects.

  **NOTE:**

  There are undocumented data associated with this structure.

  - **operation**

    *int* value indicating how multiple subpath should be combined:

    1: Or (union), 2: Not-Or, 3: And (intersect), 0: Xor (exclude)

    The first path element is applied to the background surface. Intersection does not have strokes.

  - **index**

    *int* index that specifies corresponding origination object.

  - **is\_closed()**

    Returns whether if the path is closed or not.

    - **Returns**

      *bool*.

### Knot

- **class psd\_tools.psd.vector.Knot(preceding: tuple = (0.0, 0.0), anchor: tuple = (0.0, 0.0), leaving: tuple = (0.0, 0.0))**

  Knot element consisting of 3 control points for Bezier curves.

  - **preceding**

    (y, x) tuple of preceding control point in relative coordinates.

  - **anchor**

    (y, x) tuple of anchor point in relative coordinates.

  - **leaving**

    (y, x) tuple of leaving control point in relative coordinates.

### ClipboardRecord

- **class psd\_tools.psd.vector.ClipboardRecord(top: int = 0, left: int = 0, bottom: int = 0, right: int = 0, resolution: int = 0)**

  Clipboard record.

  - **top**

    Top position in *int*

  - **left**

    Left position in *int*

  - **bottom**

    Bottom position in *int*

  - **right**

    Right position in *int*

  - **resolution**

    Resolution in *int*

### PathFillRule

- **class psd\_tools.psd.vector.PathFillRule**

  Path fill rule record, empty.

### InitialFillRule

- **class psd\_tools.psd.vector.InitialFillRule(value=0)**

  Initial fill rule record.

  - **rule**

    A value of 1 means that the fill starts with all pixels. The value will be either 0 or 1.

### VectorMaskSetting

- **class psd\_tools.psd.vector.VectorMaskSetting(version: int = 3, flags: int = 0, path=None)**

  VectorMaskSetting structure.

  - **version**

    - **path**

    List of *Subpath* objects.

  - **property disable**

    Flag to indicate that the vector mask is disabled.

  - **property invert**

    Flag to indicate that the vector mask is inverted.

  - **property not\_link**

    Flag to indicate that the vector mask is not linked.

### VectorStrokeContentSetting

- **class psd\_tools.psd.vector.VectorStrokeContentSetting(items=NOTHING, name: str = '', classID=b'null', key: bytes = b'\\x00\\x00\\x00\\x00', version: int = 1)**

  Dict-like Descriptor-based structure. See *Descriptor*.

  - **key**

    - **version**

    ### psd\_tools.terminology

Constants for descriptor.

This file is automaticaly generated by tools/extract\_terminology.py

### Klass

- **class psd\_tools.terminology.Klass(value, names=\<not given\>, \*values, module=None, qualname=None, type=None, start=1, boundary=None)**

  Klass definitions extracted from PITerminology.h.

  See *https://www.adobe.com/devnet/photoshop/sdk.html*

  - **Action = b'Actn'**

    - **ActionSet = b'ASet'**

    - **Adjustment = b'Adjs'**

    - **AdjustmentLayer = b'AdjL'**

    - **AirbrushTool = b'AbTl'**

    - **AlphaChannelOptions = b'AChl'**

    - **AntiAliasedPICTAcquire = b'AntA'**

    - **Application = b'capp'**

    - **Arrowhead = b'cArw'**

    - **ArtHistoryBrushTool = b'ABTl'**

    - **Assert = b'Asrt'**

    - **AssumedProfile = b'AssP'**

    - **BMPFormat = b'BMPF'**

    - **BackLight = b'BakL'**

    - **BackgroundEraserTool = b'SETl'**

    - **BackgroundLayer = b'BckL'**

    - **BevelEmboss = b'ebbl'**

    - **BitmapMode = b'BtmM'**

    - **BlendRange = b'Blnd'**

    - **BlurTool = b'BlTl'**

    - **BookColor = b'BkCl'**

    - **BrightnessContrast = b'BrgC'**

    - **Brush = b'Brsh'**

    - **BurnInTool = b'BrTl'**

    - **CMYKColor = b'CMYC'**

    - **CMYKColorMode = b'CMYM'**

    - **CMYKSetup = b'CMYS'**

    - **CachePrefs = b'CchP'**

    - **Calculation = b'Clcl'**

    - **Channel = b'Chnl'**

    - **ChannelMatrix = b'ChMx'**

    - **ChannelMixer = b'ChnM'**

    - **ChromeFX = b'ChFX'**

    - **CineonFormat = b'SDPX'**

    - **ClippingInfo = b'Clpo'**

    - **ClippingPath = b'ClpP'**

    - **CloneStampTool = b'ClTl'**

    - **Color = b'Clr '**

    - **ColorBalance = b'ClrB'**

    - **ColorCast = b'ColC'**

    - **ColorCorrection = b'ClrC'**

    - **ColorPickerPrefs = b'Clrk'**

    - **ColorSampler = b'ClSm'**

    - **ColorStop = b'Clrt'**

    - **Command = b'Cmnd'**

    - **Contour = b'FxSc'**

    - **CurvePoint = b'CrPt'**

    - **Curves = b'Crvs'**

    - **CurvesAdjustment = b'CrvA'**

    - **CustomPalette = b'Cstl'**

    - **CustomPhosphors = b'CstP'**

    - **CustomWhitePoint = b'CstW'**

    - **DicomFormat = b'Dicm'**

    - **DisplayPrefs = b'DspP'**

    - **Document = b'Dcmn'**

    - **DodgeTool = b'DdTl'**

    - **DropShadow = b'DrSh'**

    - **DuotoneInk = b'DtnI'**

    - **DuotoneMode = b'DtnM'**

    - **EPSGenericFormat = b'EPSG'**

    - **EPSPICTPreview = b'EPSC'**

    - **EPSTIFFPreview = b'EPST'**

    - **EXRf = b'EXRf'**

    - **Element = b'Elmn'**

    - **Ellipse = b'Elps'**

    - **EraserTool = b'ErTl'**

    - **Export = b'Expr'**

    - **FileInfo = b'FlIn'**

    - **FileSavePrefs = b'FlSv'**

    - **FillFlash = b'FilF'**

    - **FlashPixFormat = b'FlsP'**

    - **FontDesignAxes = b'FntD'**

    - **Format = b'Fmt '**

    - **FrameFX = b'FrFX'**

    - **GIF89aExport = b'GF89'**

    - **GIFFormat = b'GFFr'**

    - **GeneralPrefs = b'GnrP'**

    - **GlobalAngle = b'gblA'**

    - **Gradient = b'Grdn'**

    - **GradientFill = b'Grdf'**

    - **GradientMap = b'GdMp'**

    - **GradientTool = b'GrTl'**

    - **GraySetup = b'GrSt'**

    - **Grayscale = b'Grsc'**

    - **GrayscaleMode = b'Grys'**

    - **Guide = b'Gd '**

    - **GuidesPrefs = b'GdPr'**

    - **HSBColor = b'HSBC'**

    - **HSBColorMode = b'HSBM'**

    - **HalftoneScreen = b'HlfS'**

    - **HalftoneSpec = b'Hlfp'**

    - **HistoryBrushTool = b'HBTl'**

    - **HistoryPrefs = b'CHsP'**

    - **HistoryState = b'HstS'**

    - **HueSatAdjustment = b'HStA'**

    - **HueSatAdjustmentV2 = b'Hst2'**

    - **HueSaturation = b'HStr'**

    - **IFFFormat = b'IFFF'**

    - **IllustratorPathsExport = b'IlsP'**

    - **ImagePoint = b'ImgP'**

    - **Import = b'Impr'**

    - **IndexedColorMode = b'IndC'**

    - **InkTransfer = b'InkT'**

    - **InnerGlow = b'IrGl'**

    - **InnerShadow = b'IrSh'**

    - **InterfaceColor = b'IClr'**

    - **Invert = b'Invr'**

    - **JPEGFormat = b'JPEG'**

    - **LabColor = b'LbCl'**

    - **LabColorMode = b'LbCM'**

    - **Layer = b'Lyr '**

    - **LayerEffects = b'Lefx'**

    - **LayerFXVisible = b'lfxv'**

    - **Levels = b'Lvls'**

    - **LevelsAdjustment = b'LvlA'**

    - **LightSource = b'LghS'**

    - **Line = b'Ln '**

    - **MacPaintFormat = b'McPn'**

    - **MagicEraserTool = b'MgEr'**

    - **MagicPoint = b'Mgcp'**

    - **Mask = b'Msk '**

    - **MenuItem = b'Mn '**

    - **Mode = b'Md '**

    - **MultichannelMode = b'MltC'**

    - **Null = b'null'**

    - **ObsoleteTextLayer = b'TxLy'**

    - **Offset = b'Ofst'**

    - **Opacity = b'Opac'**

    - **OuterGlow = b'OrGl'**

    - **PDFGenericFormat = b'PDFG'**

    - **PICTFileFormat = b'PICF'**

    - **PICTResourceFormat = b'PICR'**

    - **PNGFormat = b'PNGF'**

    - **PageSetup = b'PgSt'**

    - **PaintbrushTool = b'PbTl'**

    - **Path = b'Path'**

    - **PathComponent = b'PaCm'**

    - **PathPoint = b'Pthp'**

    - **Pattern = b'PttR'**

    - **PatternStampTool = b'PaTl'**

    - **PencilTool = b'PcTl'**

    - **Photoshop20Format = b'Pht2'**

    - **Photoshop35Format = b'Pht3'**

    - **PhotoshopDCS2Format = b'PhD2'**

    - **PhotoshopDCSFormat = b'PhD1'**

    - **PhotoshopEPSFormat = b'PhtE'**

    - **PhotoshopPDFFormat = b'PhtP'**

    - **Pixel = b'Pxel'**

    - **PixelPaintFormat = b'PxlP'**

    - **PluginPrefs = b'PlgP'**

    - **Point = b'Pnt '**

    - **Point16 = b'Pnt1'**

    - **Polygon = b'Plgn'**

    - **Posterize = b'Pstr'**

    - **Preferences = b'GnrP'**

    - **ProfileSetup = b'PrfS'**

    - **Property = b'Prpr'**

    - **RGBColor = b'RGBC'**

    - **RGBColorMode = b'RGBM'**

    - **RGBSetup = b'RGBt'**

    - **Range = b'Rang'**

    - **RawFormat = b'Rw '**

    - **Rect16 = b'Rct1'**

    - **Rectangle = b'Rctn'**

    - **SaturationTool = b'SrTl'**

    - **ScitexCTFormat = b'Sctx'**

    - **Selection = b'csel'**

    - **SelectiveColor = b'SlcC'**

    - **ShapingCurve = b'ShpC'**

    - **SharpenTool = b'ShTl'**

    - **SingleColumn = b'Sngc'**

    - **SingleRow = b'Sngr'**

    - **SmudgeTool = b'SmTl'**

    - **Snapshot = b'SnpS'**

    - **SolidFill = b'SoFi'**

    - **SpotColorChannel = b'SCch'**

    - **Style = b'StyC'**

    - **SubPath = b'Sbpl'**

    - **TIFFFormat = b'TIFF'**

    - **TargaFormat = b'TrgF'**

    - **TextLayer = b'TxLr'**

    - **TextStyle = b'TxtS'**

    - **TextStyleRange = b'Txtt'**

    - **Threshold = b'Thrs'**

    - **Tool = b'Tool'**

    - **TransferPoint = b'DtnP'**

    - **TransferSpec = b'Trfp'**

    - **TransparencyPrefs = b'TrnP'**

    - **TransparencyStop = b'TrnS'**

    - **UnitsPrefs = b'UntP'**

    - **UnspecifiedColor = b'UnsC'**

    - **Version = b'Vrsn'**

    - **WebdavPrefs = b'Wdbv'**

    - **XYYColor = b'XYYC'**

    ### Enum

- **class psd\_tools.terminology.Enum(value, names=\<not given\>, \*values, module=None, qualname=None, type=None, start=1, boundary=None)**

  Enum definitions extracted from PITerminology.h.

  See *https://www.adobe.com/devnet/photoshop/sdk.html*

  - **A = b'A '**

    - **ADSBottoms = b'AdBt'**

    - **ADSCentersH = b'AdCH'**

    - **ADSCentersV = b'AdCV'**

    - **ADSHorizontal = b'AdHr'**

    - **ADSLefts = b'AdLf'**

    - **ADSRights = b'AdRg'**

    - **ADSTops = b'AdTp'**

    - **ADSVertical = b'AdVr'**

    - **ASCII = b'ASCI'**

    - **AboutApp = b'AbAp'**

    - **AbsColorimetric = b'AClr'**

    - **Absolute = b'Absl'**

    - **ActualPixels = b'ActP'**

    - **Adaptive = b'Adpt'**

    - **Add = b'Add '**

    - **AdjustmentOptions = b'AdjO'**

    - **AdobeRGB1998 = b'SMPT'**

    - **AirbrushEraser = b'Arbs'**

    - **All = b'Al '**

    - **Amiga = b'Amga'**

    - **AmountHigh = b'amHi'**

    - **AmountLow = b'amLo'**

    - **AmountMedium = b'amMd'**

    - **Angle = b'Angl'**

    - **AntiAliasCrisp = b'AnCr'**

    - **AntiAliasHigh = b'AnHi'**

    - **AntiAliasLow = b'AnLo'**

    - **AntiAliasMedium = b'AnMd'**

    - **AntiAliasNone = b'Anno'**

    - **AntiAliasSmooth = b'AnSm'**

    - **AntiAliasStrong = b'AnSt'**

    - **Any = b'Any '**

    - **AppleRGB = b'AppR'**

    - **ApplyImage = b'AplI'**

    - **AroundCenter = b'ArnC'**

    - **Arrange = b'Arng'**

    - **Ask = b'Ask '**

    - **AskWhenOpening = b'AskW'**

    - **B = b'B '**

    - **Back = b'Back'**

    - **Background = b'Bckg'**

    - **BackgroundColor = b'BckC'**

    - **Backward = b'Bckw'**

    - **Behind = b'Bhnd'**

    - **Best = b'Bst '**

    - **Better = b'Dthb'**

    - **Bicubic = b'Bcbc'**

    - **Bilinear = b'Blnr'**

    - **Binary = b'Bnry'**

    - **BitDepth1 = b'BD1 '**

    - **BitDepth16 = b'BD16'**

    - **BitDepth24 = b'BD24'**

    - **BitDepth32 = b'BD32'**

    - **BitDepth4 = b'BD4 '**

    - **BitDepth8 = b'BD8 '**

    - **BitDepthA1R5G5B5 = b'1565'**

    - **BitDepthA4R4G4B4 = b'4444'**

    - **BitDepthR5G6B5 = b'x565'**

    - **BitDepthX4R4G4B4 = b'x444'**

    - **BitDepthX8R8G8B8 = b'x888'**

    - **Bitmap = b'Btmp'**

    - **Black = b'Blck'**

    - **BlackAndWhite = b'BanW'**

    - **BlackBody = b'BlcB'**

    - **Blacks = b'Blks'**

    - **Blast = b'Blst'**

    - **BlockEraser = b'Blk '**

    - **Blocks = b'Blks'**

    - **Blue = b'Bl '**

    - **Blues = b'Bls '**

    - **Bottom = b'Bttm'**

    - **BrushDarkRough = b'BrDR'**

    - **BrushLightRough = b'BrsL'**

    - **BrushSimple = b'BrSm'**

    - **BrushSize = b'BrsS'**

    - **BrushSparkle = b'BrSp'**

    - **BrushWideBlurry = b'BrbW'**

    - **BrushWideSharp = b'BrsW'**

    - **BrushesAppend = b'BrsA'**

    - **BrushesDefine = b'BrsD'**

    - **BrushesDelete = b'Brsf'**

    - **BrushesLoad = b'Brsd'**

    - **BrushesNew = b'BrsN'**

    - **BrushesOptions = b'BrsO'**

    - **BrushesReset = b'BrsR'**

    - **BrushesSave = b'Brsv'**

    - **Builtin = b'Bltn'**

    - **BurnInH = b'BrnH'**

    - **BurnInM = b'BrnM'**

    - **BurnInS = b'BrnS'**

    - **ButtonMode = b'BtnM'**

    - **CIERGB = b'CRGB'**

    - **CMYK = b'CMYK'**

    - **CMYK64 = b'CMSF'**

    - **CMYKColor = b'ECMY'**

    - **Calculations = b'Clcl'**

    - **Cascade = b'Cscd'**

    - **Center = b'Cntr'**

    - **CenterGlow = b'SrcC'**

    - **CenteredFrame = b'CtrF'**

    - **ChannelOptions = b'ChnO'**

    - **ChannelsPaletteOptions = b'ChnP'**

    - **CheckerboardLarge = b'ChcL'**

    - **CheckerboardMedium = b'ChcM'**

    - **CheckerboardNone = b'ChcN'**

    - **CheckerboardSmall = b'ChcS'**

    - **Clear = b'Clar'**

    - **ClearGuides = b'ClrG'**

    - **Clipboard = b'Clpb'**

    - **ClippingPath = b'ClpP'**

    - **CloseAll = b'ClsA'**

    - **CoarseDots = b'CrsD'**

    - **Color = b'Clr '**

    - **ColorBurn = b'CBrn'**

    - **ColorDodge = b'CDdg'**

    - **ColorMatch = b'ClMt'**

    - **ColorNoise = b'ClNs'**

    - **Colorimetric = b'Clrm'**

    - **Composite = b'Cmps'**

    - **ContourCustom = b'sp06'**

    - **ContourDouble = b'sp04'**

    - **ContourGaussian = b'sp02'**

    - **ContourLinear = b'sp01'**

    - **ContourSingle = b'sp03'**

    - **ContourTriple = b'sp05'**

    - **ConvertToCMYK = b'CnvC'**

    - **ConvertToGray = b'CnvG'**

    - **ConvertToLab = b'CnvL'**

    - **ConvertToRGB = b'CnvR'**

    - **CreateDuplicate = b'CrtD'**

    - **CreateInterpolation = b'CrtI'**

    - **Cross = b'Crs '**

    - **CurrentLayer = b'CrrL'**

    - **Custom = b'Cst '**

    - **CustomPattern = b'Cstm'**

    - **CustomStops = b'CstS'**

    - **Cyan = b'Cyn '**

    - **Cyans = b'Cyns'**

    - **Dark = b'Drk '**

    - **Darken = b'Drkn'**

    - **DarkenOnly = b'DrkO'**

    - **DashedLines = b'DshL'**

    - **Desaturate = b'Dstt'**

    - **Diamond = b'Dmnd'**

    - **Difference = b'Dfrn'**

    - **Diffusion = b'Dfsn'**

    - **DiffusionDither = b'DfnD'**

    - **DisplayCursorsPreferences = b'DspC'**

    - **Dissolve = b'Dslv'**

    - **Distort = b'Dstr'**

    - **DodgeH = b'DdgH'**

    - **DodgeM = b'DdgM'**

    - **DodgeS = b'DdgS'**

    - **Dots = b'Dts '**

    - **Draft = b'Drft'**

    - **Duotone = b'Dtn '**

    - **EBUITU = b'EBT '**

    - **EdgeGlow = b'SrcE'**

    - **EliminateEvenFields = b'ElmE'**

    - **EliminateOddFields = b'ElmO'**

    - **Ellipse = b'Elps'**

    - **Emboss = b'Embs'**

    - **Exact = b'Exct'**

    - **Exclusion = b'Xclu'**

    - **FPXCompressLossyJPEG = b'FxJP'**

    - **FPXCompressNone = b'FxNo'**

    - **Faster = b'Dthf'**

    - **File = b'Fle '**

    - **FileInfo = b'FlIn'**

    - **FillBack = b'FlBc'**

    - **FillFore = b'FlFr'**

    - **FillInverse = b'FlIn'**

    - **FillSame = b'FlSm'**

    - **FineDots = b'FnDt'**

    - **First = b'Frst'**

    - **FirstIdle = b'FrId'**

    - **FitOnScreen = b'FtOn'**

    - **ForegroundColor = b'FrgC'**

    - **Forward = b'Frwr'**

    - **FreeTransform = b'FrTr'**

    - **Front = b'Frnt'**

    - **FullDocument = b'FllD'**

    - **FullSize = b'FlSz'**

    - **GIFColorFileColorTable = b'GFCT'**

    - **GIFColorFileColors = b'GFCF'**

    - **GIFColorFileMicrosoftPalette = b'GFMS'**

    - **GIFPaletteAdaptive = b'GFPA'**

    - **GIFPaletteExact = b'GFPE'**

    - **GIFPaletteOther = b'GFPO'**

    - **GIFPaletteSystem = b'GFPS'**

    - **GIFRequiredColorSpaceIndexed = b'GFCI'**

    - **GIFRequiredColorSpaceRGB = b'GFRG'**

    - **GIFRowOrderInterlaced = b'GFIN'**

    - **GIFRowOrderNormal = b'GFNI'**

    - **GaussianDistribution = b'Gsn '**

    - **GeneralPreferences = b'GnrP'**

    - **Good = b'Gd '**

    - **GradientFill = b'GrFl'**

    - **GrainClumped = b'GrnC'**

    - **GrainContrasty = b'GrCn'**

    - **GrainEnlarged = b'GrnE'**

    - **GrainHorizontal = b'GrnH'**

    - **GrainRegular = b'GrnR'**

    - **GrainSoft = b'GrSf'**

    - **GrainSpeckle = b'GrSp'**

    - **GrainSprinkles = b'GrSr'**

    - **GrainStippled = b'GrSt'**

    - **GrainVertical = b'GrnV'**

    - **GrainyDots = b'GrnD'**

    - **Graphics = b'Grp '**

    - **Gray = b'Gry '**

    - **Gray16 = b'GryX'**

    - **Gray18 = b'Gr18'**

    - **Gray22 = b'Gr22'**

    - **Gray50 = b'Gr50'**

    - **GrayScale = b'Gryc'**

    - **Grayscale = b'Grys'**

    - **Green = b'Grn '**

    - **Greens = b'Grns'**

    - **GuidesGridPreferences = b'GudG'**

    - **HDTV = b'HDTV'**

    - **HSBColor = b'HSBl'**

    - **HSLColor = b'HSLC'**

    - **HalftoneFile = b'HlfF'**

    - **HalftoneScreen = b'HlfS'**

    - **HardLight = b'HrdL'**

    - **Heavy = b'Hvy '**

    - **HideAll = b'HdAl'**

    - **HideSelection = b'HdSl'**

    - **High = b'High'**

    - **HighQuality = b'Hgh '**

    - **Highlights = b'Hghl'**

    - **Histogram = b'Hstg'**

    - **History = b'Hsty'**

    - **HistoryPaletteOptions = b'HstO'**

    - **HistoryPreferences = b'HstP'**

    - **Horizontal = b'Hrzn'**

    - **HorizontalOnly = b'HrzO'**

    - **Hue = b'H '**

    - **IBMPC = b'IBMP'**

    - **ICC = b'ICC '**

    - **Icon = b'Icn '**

    - **IdleVM = b'IdVM'**

    - **Ignore = b'Ignr'**

    - **Image = b'Img '**

    - **ImageCachePreferences = b'ImgP'**

    - **IndexedColor = b'Indl'**

    - **InfoPaletteOptions = b'InfP'**

    - **InfoPaletteToggleSamplers = b'InfT'**

    - **InnerBevel = b'InrB'**

    - **InsetFrame = b'InsF'**

    - **Inside = b'Insd'**

    - **JPEG = b'JPEG'**

    - **JustifyAll = b'JstA'**

    - **JustifyFull = b'JstF'**

    - **KeepProfile = b'KPro'**

    - **KeyboardPreferences = b'KybP'**

    - **Lab = b'Lab '**

    - **Lab48 = b'LbCF'**

    - **LabColor = b'LbCl'**

    - **Large = b'Lrg '**

    - **Last = b'Lst '**

    - **LastFilter = b'LstF'**

    - **LayerOptions = b'LyrO'**

    - **LayersPaletteOptions = b'LyrP'**

    - **Left = b'Left'**

    - **Left\_PLUGIN = b'Lft '**

    - **LevelBased = b'LvlB'**

    - **Light = b'Lgt '**

    - **LightBlue = b'LgtB'**

    - **LightDirBottom = b'LDBt'**

    - **LightDirBottomLeft = b'LDBL'**

    - **LightDirBottomRight = b'LDBR'**

    - **LightDirLeft = b'LDLf'**

    - **LightDirRight = b'LDRg'**

    - **LightDirTop = b'LDTp'**

    - **LightDirTopLeft = b'LDTL'**

    - **LightDirTopRight = b'LDTR'**

    - **LightDirectional = b'LghD'**

    - **LightGray = b'LgtG'**

    - **LightOmni = b'LghO'**

    - **LightPosBottom = b'LPBt'**

    - **LightPosBottomLeft = b'LPBL'**

    - **LightPosBottomRight = b'LPBr'**

    - **LightPosLeft = b'LPLf'**

    - **LightPosRight = b'LPRg'**

    - **LightPosTop = b'LPTp'**

    - **LightPosTopLeft = b'LPTL'**

    - **LightPosTopRight = b'LPTR'**

    - **LightRed = b'LgtR'**

    - **LightSpot = b'LghS'**

    - **Lighten = b'Lghn'**

    - **LightenOnly = b'LghO'**

    - **Lightness = b'Lght'**

    - **Line = b'Ln '**

    - **Linear = b'Lnr '**

    - **Lines = b'Lns '**

    - **Linked = b'Lnkd'**

    - **LongLines = b'LngL'**

    - **LongStrokes = b'LngS'**

    - **Low = b'Low '**

    - **LowQuality = b'Lw '**

    - **Lower = b'Lwr '**

    - **Luminosity = b'Lmns'**

    - **MacThumbnail = b'McTh'**

    - **Macintosh = b'Mcnt'**

    - **MacintoshSystem = b'McnS'**

    - **Magenta = b'Mgnt'**

    - **Magentas = b'Mgnt'**

    - **Mask = b'Msk '**

    - **MaskedAreas = b'MskA'**

    - **MasterAdaptive = b'MAdp'**

    - **MasterPerceptual = b'MPer'**

    - **MasterSelective = b'MSel'**

    - **Maximum = b'Mxmm'**

    - **MaximumQuality = b'Mxm '**

    - **Maya = b'Maya'**

    - **Medium = b'Mdim'**

    - **MediumBlue = b'MdmB'**

    - **MediumDots = b'MdmD'**

    - **MediumLines = b'MdmL'**

    - **MediumQuality = b'Mdm '**

    - **MediumStrokes = b'MdmS'**

    - **MemoryPreferences = b'MmrP'**

    - **MergeChannels = b'MrgC'**

    - **Merged = b'Mrgd'**

    - **MergedLayers = b'Mrg2'**

    - **MergedLayersOld = b'MrgL'**

    - **Middle = b'Mddl'**

    - **Midtones = b'Mdtn'**

    - **ModeGray = b'MdGr'**

    - **ModeRGB = b'MdRG'**

    - **Monitor = b'Moni'**

    - **MonitorSetup = b'MntS'**

    - **Monotone = b'Mntn'**

    - **Multi72Color = b'72CM'**

    - **Multi72Gray = b'72GM'**

    - **MultiNoCompositePS = b'NCmM'**

    - **Multichannel = b'Mlth'**

    - **Multiply = b'Mltp'**

    - **NTSC = b'NTSC'**

    - **NavigatorPaletteOptions = b'NvgP'**

    - **NearestNeighbor = b'Nrst'**

    - **NetscapeGray = b'NsGr'**

    - **Neutrals = b'Ntrl'**

    - **NewView = b'NwVw'**

    - **Next = b'Nxt '**

    - **Nikon = b'Nkn '**

    - **Nikon105 = b'Nkn1'**

    - **No = b'N '**

    - **NoCompositePS = b'NCmp'**

    - **Normal = b'Nrml'**

    - **NormalPath = b'NrmP'**

    - **Null = b'null'**

    - **OS2 = b'OS2 '**

    - **Off = b'Off '**

    - **On = b'On '**

    - **OpenAs = b'OpAs'**

    - **Orange = b'Orng'**

    - **OutFromCenter = b'OtFr'**

    - **OutOfGamut = b'OtOf'**

    - **OuterBevel = b'OtrB'**

    - **OutsetFrame = b'OutF'**

    - **Outside = b'Otsd'**

    - **Overlay = b'Ovrl'**

    - **P22EBU = b'P22B'**

    - **PNGFilterAdaptive = b'PGAd'**

    - **PNGFilterAverage = b'PGAv'**

    - **PNGFilterNone = b'PGNo'**

    - **PNGFilterPaeth = b'PGPt'**

    - **PNGFilterSub = b'PGSb'**

    - **PNGFilterUp = b'PGUp'**

    - **PNGInterlaceAdam7 = b'PGIA'**

    - **PNGInterlaceNone = b'PGIN'**

    - **PagePosCentered = b'PgPC'**

    - **PagePosTopLeft = b'PgTL'**

    - **PageSetup = b'PgSt'**

    - **PaintbrushEraser = b'Pntb'**

    - **PalSecam = b'PlSc'**

    - **PanaVision = b'PnVs'**

    - **PathsPaletteOptions = b'PthP'**

    - **Pattern = b'Ptrn'**

    - **PatternDither = b'PtnD'**

    - **PencilEraser = b'Pncl'**

    - **Perceptual = b'Perc'**

    - **Perspective = b'Prsp'**

    - **PhotoshopPicker = b'Phtk'**

    - **PickCMYK = b'PckC'**

    - **PickGray = b'PckG'**

    - **PickHSB = b'PckH'**

    - **PickLab = b'PckL'**

    - **PickOptions = b'PckO'**

    - **PickRGB = b'PckR'**

    - **PillowEmboss = b'PlEb'**

    - **PixelPaintSize1 = b'PxS1'**

    - **PixelPaintSize2 = b'PxS2'**

    - **PixelPaintSize3 = b'PxS3'**

    - **PixelPaintSize4 = b'PxS4'**

    - **Place = b'Plce'**

    - **PlaybackOptions = b'PbkO'**

    - **PluginPicker = b'PlgP'**

    - **PluginsScratchDiskPreferences = b'PlgS'**

    - **PolarToRect = b'PlrR'**

    - **PondRipples = b'PndR'**

    - **Precise = b'Prc '**

    - **PreciseMatte = b'PrBL'**

    - **PreviewBlack = b'PrvB'**

    - **PreviewCMY = b'PrvN'**

    - **PreviewCMYK = b'PrvC'**

    - **PreviewCyan = b'Prvy'**

    - **PreviewMagenta = b'PrvM'**

    - **PreviewOff = b'PrvO'**

    - **PreviewYellow = b'PrvY'**

    - **Previous = b'Prvs'**

    - **Primaries = b'Prim'**

    - **PrintSize = b'PrnS'**

    - **PrintingInksSetup = b'PrnI'**

    - **Purple = b'Prp '**

    - **Pyramids = b'Pyrm'**

    - **QCSAverage = b'Qcsa'**

    - **QCSCorner0 = b'Qcs0'**

    - **QCSCorner1 = b'Qcs1'**

    - **QCSCorner2 = b'Qcs2'**

    - **QCSCorner3 = b'Qcs3'**

    - **QCSIndependent = b'Qcsi'**

    - **QCSSide0 = b'Qcs4'**

    - **QCSSide1 = b'Qcs5'**

    - **QCSSide2 = b'Qcs6'**

    - **QCSSide3 = b'Qcs7'**

    - **Quadtone = b'Qdtn'**

    - **QueryAlways = b'QurA'**

    - **QueryAsk = b'Qurl'**

    - **QueryNever = b'QurN'**

    - **RGB = b'RGB '**

    - **RGB48 = b'RGBF'**

    - **RGBColor = b'RGBC'**

    - **Radial = b'Rdl '**

    - **Random = b'Rndm'**

    - **RectToPolar = b'RctP'**

    - **Red = b'Rd '**

    - **RedrawComplete = b'RdCm'**

    - **Reds = b'Rds '**

    - **Reflected = b'Rflc'**

    - **Relative = b'Rltv'**

    - **Repeat = b'Rpt '**

    - **RepeatEdgePixels = b'RptE'**

    - **RevealAll = b'RvlA'**

    - **RevealSelection = b'RvlS'**

    - **Revert = b'Rvrt'**

    - **Right = b'Rght'**

    - **Rotate = b'Rtte'**

    - **RotoscopingPreferences = b'RtsP'**

    - **Round = b'Rnd '**

    - **RulerCm = b'RrCm'**

    - **RulerInches = b'RrIn'**

    - **RulerPercent = b'RrPr'**

    - **RulerPicas = b'RrPi'**

    - **RulerPixels = b'RrPx'**

    - **RulerPoints = b'RrPt'**

    - **SMPTEC = b'SMPC'**

    - **SRGB = b'SRGB'**

    - **Sample3x3 = b'Smp3'**

    - **Sample5x5 = b'Smp5'**

    - **SamplePoint = b'SmpP'**

    - **Saturate = b'Str '**

    - **Saturation = b'Strt'**

    - **SaveForWeb = b'Svfw'**

    - **Saved = b'Sved'**

    - **SavingFilesPreferences = b'SvnF'**

    - **Scale = b'Scl '**

    - **Screen = b'Scrn'**

    - **ScreenCircle = b'ScrC'**

    - **ScreenDot = b'ScrD'**

    - **ScreenLine = b'ScrL'**

    - **SelectedAreas = b'SlcA'**

    - **Selection = b'Slct'**

    - **Selective = b'Sele'**

    - **SeparationSetup = b'SprS'**

    - **SeparationTables = b'SprT'**

    - **Shadows = b'Shdw'**

    - **ShortLines = b'ShrL'**

    - **ShortStrokes = b'ShSt'**

    - **Single72Color = b'72CS'**

    - **Single72Gray = b'72GS'**

    - **SingleNoCompositePS = b'NCmS'**

    - **Skew = b'Skew'**

    - **SlopeLimitMatte = b'Slmt'**

    - **Small = b'Sml '**

    - **SmartBlurModeEdgeOnly = b'SBME'**

    - **SmartBlurModeNormal = b'SBMN'**

    - **SmartBlurModeOverlayEdge = b'SBMO'**

    - **SmartBlurQualityHigh = b'SBQH'**

    - **SmartBlurQualityLow = b'SBQL'**

    - **SmartBlurQualityMedium = b'SBQM'**

    - **Snapshot = b'Snps'**

    - **SoftLight = b'SftL'**

    - **SoftMatte = b'SfBL'**

    - **SolidColor = b'SClr'**

    - **Spectrum = b'Spct'**

    - **Spin = b'Spn '**

    - **SpotColor = b'Spot'**

    - **Square = b'Sqr '**

    - **Stagger = b'Stgr'**

    - **StampIn = b'In '**

    - **StampOut = b'Out '**

    - **Standard = b'Std '**

    - **StdA = b'StdA'**

    - **StdB = b'StdB'**

    - **StdC = b'StdC'**

    - **StdE = b'StdE'**

    - **StretchToFit = b'StrF'**

    - **StrokeDirHorizontal = b'SDHz'**

    - **StrokeDirLeftDiag = b'SDLD'**

    - **StrokeDirRightDiag = b'SDRD'**

    - **StrokeDirVertical = b'SDVt'**

    - **StylesAppend = b'SlsA'**

    - **StylesDelete = b'Slsf'**

    - **StylesLoad = b'Slsd'**

    - **StylesNew = b'SlsN'**

    - **StylesReset = b'SlsR'**

    - **StylesSave = b'Slsv'**

    - **Subtract = b'Sbtr'**

    - **SwatchesAppend = b'SwtA'**

    - **SwatchesReplace = b'Swtp'**

    - **SwatchesReset = b'SwtR'**

    - **SwatchesSave = b'SwtS'**

    - **SystemPicker = b'SysP'**

    - **TIFF = b'TIFF'**

    - **Tables = b'Tbl '**

    - **Target = b'Trgt'**

    - **TargetPath = b'Trgp'**

    - **TexTypeBlocks = b'TxBl'**

    - **TexTypeBrick = b'TxBr'**

    - **TexTypeBurlap = b'TxBu'**

    - **TexTypeCanvas = b'TxCa'**

    - **TexTypeFrosted = b'TxFr'**

    - **TexTypeSandstone = b'TxSt'**

    - **TexTypeTinyLens = b'TxTL'**

    - **Threshold = b'Thrh'**

    - **Thumbnail = b'Thmb'**

    - **Tile = b'Tile'**

    - **Tile\_PLUGIN = b'Tl '**

    - **ToggleActionsPalette = b'TglA'**

    - **ToggleBlackPreview = b'TgBP'**

    - **ToggleBrushesPalette = b'TglB'**

    - **ToggleCMYKPreview = b'TglC'**

    - **ToggleCMYPreview = b'TgCM'**

    - **ToggleChannelsPalette = b'Tglh'**

    - **ToggleColorPalette = b'Tglc'**

    - **ToggleCyanPreview = b'TgCP'**

    - **ToggleDocumentPalette = b'TgDc'**

    - **ToggleEdges = b'TglE'**

    - **ToggleGamutWarning = b'TglG'**

    - **ToggleGrid = b'TgGr'**

    - **ToggleGuides = b'Tgld'**

    - **ToggleHistoryPalette = b'TglH'**

    - **ToggleInfoPalette = b'TglI'**

    - **ToggleLayerMask = b'TglM'**

    - **ToggleLayersPalette = b'Tgly'**

    - **ToggleLockGuides = b'TglL'**

    - **ToggleMagentaPreview = b'TgMP'**

    - **ToggleNavigatorPalette = b'TglN'**

    - **ToggleOptionsPalette = b'TglO'**

    - **TogglePaths = b'TglP'**

    - **TogglePathsPalette = b'Tglt'**

    - **ToggleRGBMacPreview = b'TrMp'**

    - **ToggleRGBUncompensatedPreview = b'TrUp'**

    - **ToggleRGBWindowsPreview = b'TrWp'**

    - **ToggleRulers = b'TglR'**

    - **ToggleSnapToGrid = b'TgSn'**

    - **ToggleSnapToGuides = b'TglS'**

    - **ToggleStatusBar = b'Tgls'**

    - **ToggleStylesPalette = b'TgSl'**

    - **ToggleSwatchesPalette = b'Tglw'**

    - **ToggleToolsPalette = b'TglT'**

    - **ToggleYellowPreview = b'TgYP'**

    - **Top = b'Top '**

    - **Transparency = b'Trsp'**

    - **TransparencyGamutPreferences = b'TrnG'**

    - **Transparent = b'Trns'**

    - **Trinitron = b'Trnt'**

    - **Tritone = b'Trtn'**

    - **UIBitmap = b'UBtm'**

    - **UICMYK = b'UCMY'**

    - **UIDuotone = b'UDtn'**

    - **UIGrayscale = b'UGry'**

    - **UIIndexed = b'UInd'**

    - **UILab = b'ULab'**

    - **UIMultichannel = b'UMlt'**

    - **UIRGB = b'URGB'**

    - **Undo = b'Und '**

    - **Uniform = b'Unfm'**

    - **UniformDistribution = b'Unfr'**

    - **UnitsRulersPreferences = b'UntR'**

    - **Upper = b'Upr '**

    - **UserStop = b'UsrS'**

    - **VMPreferences = b'VMPr'**

    - **Vertical = b'Vrtc'**

    - **VerticalOnly = b'VrtO'**

    - **Violet = b'Vlt '**

    - **WaveSine = b'WvSn'**

    - **WaveSquare = b'WvSq'**

    - **WaveTriangle = b'WvTr'**

    - **Web = b'Web '**

    - **White = b'Wht '**

    - **Whites = b'Whts'**

    - **WideGamutRGB = b'WRGB'**

    - **WidePhosphors = b'Wide'**

    - **WinThumbnail = b'WnTh'**

    - **Wind = b'Wnd '**

    - **Windows = b'Win '**

    - **WindowsSystem = b'WndS'**

    - **WorkPath = b'WrkP'**

    - **Wrap = b'Wrp '**

    - **WrapAround = b'WrpA'**

    - **Yellow = b'Yllw'**

    - **YellowColor = b'Ylw '**

    - **Yellows = b'Ylws'**

    - **Yes = b'Ys '**

    - **Zip = b'ZpEn'**

    - **Zoom = b'Zm '**

    - **ZoomIn = b'ZmIn'**

    - **ZoomOut = b'ZmOt'**

    - **\_16BitsPerPixel = b'16Bt'**

    - **\_1BitPerPixel = b'OnBt'**

    - **\_2BitsPerPixel = b'2Bts'**

    - **\_32BitsPerPixel = b'32Bt'**

    - **\_4BitsPerPixel = b'4Bts'**

    - **\_5000 = b'5000'**

    - **\_5500 = b'5500'**

    - **\_6500 = b'6500'**

    - **\_72Color = b'72Cl'**

    - **\_72Gray = b'72Gr'**

    - **\_7500 = b'7500'**

    - **\_8BitsPerPixel = b'EghB'**

    - **\_9300 = b'9300'**

    - **\_None = b'None'**

    ### Event

- **class psd\_tools.terminology.Event(value, names=\<not given\>, \*values, module=None, qualname=None, type=None, start=1, boundary=None)**

  Event definitions extracted from PITerminology.h.

  See *https://www.adobe.com/devnet/photoshop/sdk.html*

  - **AccentedEdges = b'AccE'**

    - **Add = b'Add '**

    - **AddNoise = b'AdNs'**

    - **AddTo = b'AddT'**

    - **Align = b'Algn'**

    - **All = b'All '**

    - **AngledStrokes = b'AngS'**

    - **ApplyImage = b'AppI'**

    - **ApplyStyle = b'ASty'**

    - **Assert = b'Asrt'**

    - **Average = b'Avrg'**

    - **BackLight = b'BacL'**

    - **BasRelief = b'BsRl'**

    - **Batch = b'Btch'**

    - **BatchFromDroplet = b'BtcF'**

    - **Blur = b'Blr '**

    - **BlurMore = b'BlrM'**

    - **Border = b'Brdr'**

    - **Brightness = b'BrgC'**

    - **CanvasSize = b'CnvS'**

    - **ChalkCharcoal = b'ChlC'**

    - **ChannelMixer = b'ChnM'**

    - **Charcoal = b'Chrc'**

    - **Chrome = b'Chrm'**

    - **Clear = b'Cler'**

    - **Close = b'Cls '**

    - **Clouds = b'Clds'**

    - **ColorBalance = b'ClrB'**

    - **ColorCast = b'ColE'**

    - **ColorHalftone = b'ClrH'**

    - **ColorRange = b'ClrR'**

    - **ColoredPencil = b'ClrP'**

    - **ConteCrayon = b'CntC'**

    - **Contract = b'Cntc'**

    - **ConvertMode = b'CnvM'**

    - **Copy = b'copy'**

    - **CopyEffects = b'CpFX'**

    - **CopyMerged = b'CpyM'**

    - **CopyToLayer = b'CpTL'**

    - **Craquelure = b'Crql'**

    - **CreateDroplet = b'CrtD'**

    - **Crop = b'Crop'**

    - **Crosshatch = b'Crsh'**

    - **Crystallize = b'Crst'**

    - **Curves = b'Crvs'**

    - **Custom = b'Cstm'**

    - **Cut = b'cut '**

    - **CutToLayer = b'CtTL'**

    - **Cutout = b'Ct '**

    - **DarkStrokes = b'DrkS'**

    - **DeInterlace = b'Dntr'**

    - **DefinePattern = b'DfnP'**

    - **Defringe = b'Dfrg'**

    - **Delete = b'Dlt '**

    - **Desaturate = b'Dstt'**

    - **Deselect = b'Dslc'**

    - **Despeckle = b'Dspc'**

    - **DifferenceClouds = b'DfrC'**

    - **Diffuse = b'Dfs '**

    - **DiffuseGlow = b'DfsG'**

    - **DisableLayerFX = b'dlfx'**

    - **Displace = b'Dspl'**

    - **Distribute = b'Dstr'**

    - **Draw = b'Draw'**

    - **DryBrush = b'DryB'**

    - **Duplicate = b'Dplc'**

    - **DustAndScratches = b'DstS'**

    - **Emboss = b'Embs'**

    - **Equalize = b'Eqlz'**

    - **Exchange = b'Exch'**

    - **Expand = b'Expn'**

    - **Export = b'Expr'**

    - **Extrude = b'Extr'**

    - **Facet = b'Fct '**

    - **Fade = b'Fade'**

    - **Feather = b'Fthr'**

    - **Fibers = b'Fbrs'**

    - **Fill = b'Fl '**

    - **FilmGrain = b'FlmG'**

    - **Filter = b'Fltr'**

    - **FindEdges = b'FndE'**

    - **FlattenImage = b'FltI'**

    - **Flip = b'Flip'**

    - **Fragment = b'Frgm'**

    - **Fresco = b'Frsc'**

    - **GaussianBlur = b'GsnB'**

    - **Get = b'getd'**

    - **Glass = b'Gls '**

    - **GlowingEdges = b'GlwE'**

    - **Gradient = b'Grdn'**

    - **GradientMap = b'GrMp'**

    - **Grain = b'Grn '**

    - **GraphicPen = b'GraP'**

    - **Group = b'GrpL'**

    - **Grow = b'Grow'**

    - **HSBHSL = b'HsbP'**

    - **HalftoneScreen = b'HlfS'**

    - **Hide = b'Hd '**

    - **HighPass = b'HghP'**

    - **HueSaturation = b'HStr'**

    - **ImageSize = b'ImgS'**

    - **Import = b'Impr'**

    - **InkOutlines = b'InkO'**

    - **Intersect = b'Intr'**

    - **IntersectWith = b'IntW'**

    - **Inverse = b'Invs'**

    - **Invert = b'Invr'**

    - **LensFlare = b'LnsF'**

    - **Levels = b'Lvls'**

    - **LightingEffects = b'LghE'**

    - **Link = b'Lnk '**

    - **Make = b'Mk '**

    - **Maximum = b'Mxm '**

    - **Median = b'Mdn '**

    - **MergeLayers = b'Mrg2'**

    - **MergeLayersOld = b'MrgL'**

    - **MergeSpotChannel = b'MSpt'**

    - **MergeVisible = b'MrgV'**

    - **Mezzotint = b'Mztn'**

    - **Minimum = b'Mnm '**

    - **Mosaic = b'Msc '**

    - **Mosaic\_PLUGIN = b'MscT'**

    - **MotionBlur = b'MtnB'**

    - **Move = b'move'**

    - **NTSCColors = b'NTSC'**

    - **NeonGlow = b'NGlw'**

    - **Next = b'Nxt '**

    - **NotePaper = b'NtPr'**

    - **Notify = b'Ntfy'**

    - **Null = b'null'**

    - **OceanRipple = b'OcnR'**

    - **Offset = b'Ofst'**

    - **Open = b'Opn '**

    - **OpenUntitled = b'OpnU'**

    - **PaintDaubs = b'PntD'**

    - **PaletteKnife = b'PltK'**

    - **Paste = b'past'**

    - **PasteEffects = b'PaFX'**

    - **PasteInto = b'PstI'**

    - **PasteOutside = b'PstO'**

    - **Patchwork = b'Ptch'**

    - **Photocopy = b'Phtc'**

    - **Pinch = b'Pnch'**

    - **Place = b'Plc '**

    - **Plaster = b'Plst'**

    - **PlasticWrap = b'PlsW'**

    - **Play = b'Ply '**

    - **Pointillize = b'Pntl'**

    - **Polar = b'Plr '**

    - **PosterEdges = b'PstE'**

    - **Posterize = b'Pstr'**

    - **Previous = b'Prvs'**

    - **Print = b'Prnt'**

    - **ProfileToProfile = b'PrfT'**

    - **Purge = b'Prge'**

    - **Quit = b'quit'**

    - **RadialBlur = b'RdlB'**

    - **Rasterize = b'Rstr'**

    - **RasterizeTypeSheet = b'RstT'**

    - **RemoveBlackMatte = b'RmvB'**

    - **RemoveLayerMask = b'RmvL'**

    - **RemoveWhiteMatte = b'RmvW'**

    - **Rename = b'Rnm '**

    - **ReplaceColor = b'RplC'**

    - **Reset = b'Rset'**

    - **Reticulation = b'Rtcl'**

    - **Revert = b'Rvrt'**

    - **Ripple = b'Rple'**

    - **Rotate = b'Rtte'**

    - **RoughPastels = b'RghP'**

    - **Save = b'save'**

    - **Select = b'slct'**

    - **SelectiveColor = b'SlcC'**

    - **Set = b'setd'**

    - **Sharpen = b'Shrp'**

    - **SharpenEdges = b'ShrE'**

    - **SharpenMore = b'ShrM'**

    - **Shear = b'Shr '**

    - **Show = b'Shw '**

    - **Similar = b'Smlr'**

    - **SmartBlur = b'SmrB'**

    - **Smooth = b'Smth'**

    - **SmudgeStick = b'SmdS'**

    - **Solarize = b'Slrz'**

    - **Spatter = b'Spt '**

    - **Spherize = b'Sphr'**

    - **SplitChannels = b'SplC'**

    - **Sponge = b'Spng'**

    - **SprayedStrokes = b'SprS'**

    - **StainedGlass = b'StnG'**

    - **Stamp = b'Stmp'**

    - **Stop = b'Stop'**

    - **Stroke = b'Strk'**

    - **Subtract = b'Sbtr'**

    - **SubtractFrom = b'SbtF'**

    - **Sumie = b'Smie'**

    - **TakeMergedSnapshot = b'TkMr'**

    - **TakeSnapshot = b'TkSn'**

    - **TextureFill = b'TxtF'**

    - **Texturizer = b'Txtz'**

    - **Threshold = b'Thrs'**

    - **Tiles = b'Tls '**

    - **TornEdges = b'TrnE'**

    - **TraceContour = b'TrcC'**

    - **Transform = b'Trnf'**

    - **Trap = b'Trap'**

    - **Twirl = b'Twrl'**

    - **Underpainting = b'Undr'**

    - **Undo = b'undo'**

    - **Ungroup = b'Ungr'**

    - **Unlink = b'Unlk'**

    - **UnsharpMask = b'UnsM'**

    - **Variations = b'Vrtn'**

    - **Wait = b'Wait'**

    - **WaterPaper = b'WtrP'**

    - **Watercolor = b'Wtrc'**

    - **Wave = b'Wave'**

    - **Wind = b'Wnd '**

    - **ZigZag = b'ZgZg'**

    - **\_3DTransform = b'TdT '**

    ### Form

- **class psd\_tools.terminology.Form(value, names=\<not given\>, \*values, module=None, qualname=None, type=None, start=1, boundary=None)**

  Form definitions extracted from PITerminology.h.

  See *https://www.adobe.com/devnet/photoshop/sdk.html*

  - **Class = b'Clss'**

    - **Enumerated = b'Enmr'**

    - **Identifier = b'Idnt'**

    - **Index = b'indx'**

    - **Offset = b'rele'**

    - **Property = b'prop'**

    ### Key

- **class psd\_tools.terminology.Key(value, names=\<not given\>, \*values, module=None, qualname=None, type=None, start=1, boundary=None)**

  Key definitions extracted from PITerminology.h.

  See *https://www.adobe.com/devnet/photoshop/sdk.html*

  - **A = b'A '**

    - **Adjustment = b'Adjs'**

    - **Aligned = b'Algd'**

    - **Alignment = b'Algn'**

    - **AllExcept = b'AllE'**

    - **AllPS = b'All '**

    - **AllToolOptions = b'AlTl'**

    - **AlphaChannelOptions = b'AChn'**

    - **AlphaChannels = b'AlpC'**

    - **AmbientBrightness = b'AmbB'**

    - **AmbientColor = b'AmbC'**

    - **Amount = b'Amnt'**

    - **AmplitudeMax = b'AmMx'**

    - **AmplitudeMin = b'AmMn'**

    - **Anchor = b'Anch'**

    - **Angle = b'Angl'**

    - **Angle1 = b'Ang1'**

    - **Angle2 = b'Ang2'**

    - **Angle3 = b'Ang3'**

    - **Angle4 = b'Ang4'**

    - **AntiAlias = b'AntA'**

    - **Append = b'Appe'**

    - **Apply = b'Aply'**

    - **Area = b'Ar '**

    - **Arrowhead = b'Arrw'**

    - **As = b'As '**

    - **AssetBin = b'Asst'**

    - **AssumedCMYK = b'AssC'**

    - **AssumedGray = b'AssG'**

    - **AssumedRGB = b'AssR'**

    - **At = b'At '**

    - **Auto = b'Auto'**

    - **AutoContrast = b'AuCo'**

    - **AutoErase = b'Atrs'**

    - **AutoKern = b'AtKr'**

    - **AutoUpdate = b'AtUp'**

    - **Axis = b'Axis'**

    - **B = b'B '**

    - **Background = b'Bckg'**

    - **BackgroundColor = b'BckC'**

    - **BackgroundLevel = b'BckL'**

    - **Backward = b'Bwd '**

    - **Balance = b'Blnc'**

    - **BaselineShift = b'Bsln'**

    - **BeepWhenDone = b'BpWh'**

    - **BeginRamp = b'BgnR'**

    - **BeginSustain = b'BgnS'**

    - **BevelDirection = b'bvlD'**

    - **BevelEmboss = b'ebbl'**

    - **BevelStyle = b'bvlS'**

    - **BevelTechnique = b'bvlT'**

    - **BigNudgeH = b'BgNH'**

    - **BigNudgeV = b'BgNV'**

    - **BitDepth = b'BtDp'**

    - **Black = b'Blck'**

    - **BlackClip = b'BlcC'**

    - **BlackGeneration = b'Blcn'**

    - **BlackGenerationCurve = b'BlcG'**

    - **BlackIntensity = b'BlcI'**

    - **BlackLevel = b'BlcL'**

    - **BlackLimit = b'BlcL'**

    - **Bleed = b'Bld '**

    - **BlendRange = b'Blnd'**

    - **Blue = b'Bl '**

    - **BlueBlackPoint = b'BlBl'**

    - **BlueFloat = b'blueFloat'**

    - **BlueGamma = b'BlGm'**

    - **BlueWhitePoint = b'BlWh'**

    - **BlueX = b'BlX '**

    - **BlueY = b'BlY '**

    - **Blur = b'blur'**

    - **BlurMethod = b'BlrM'**

    - **BlurQuality = b'BlrQ'**

    - **Book = b'Bk '**

    - **BorderThickness = b'BrdT'**

    - **Bottom = b'Btom'**

    - **Brightness = b'Brgh'**

    - **BrushDetail = b'BrsD'**

    - **BrushSize = b'BrsS'**

    - **BrushType = b'BrsT'**

    - **Brushes = b'Brsh'**

    - **BumpAmplitude = b'BmpA'**

    - **BumpChannel = b'BmpC'**

    - **By = b'By '**

    - **Byline = b'Byln'**

    - **BylineTitle = b'BylT'**

    - **ByteOrder = b'BytO'**

    - **CMYKSetup = b'CMYS'**

    - **CachePrefs = b'CchP'**

    - **Calculation = b'Clcl'**

    - **CalibrationBars = b'Clbr'**

    - **Caption = b'Cptn'**

    - **CaptionWriter = b'CptW'**

    - **Category = b'Ctgr'**

    - **CellSize = b'ClSz'**

    - **Center = b'Cntr'**

    - **CenterCropMarks = b'CntC'**

    - **ChalkArea = b'ChlA'**

    - **Channel = b'Chnl'**

    - **ChannelMatrix = b'ChMx'**

    - **ChannelName = b'ChnN'**

    - **Channels = b'Chns'**

    - **ChannelsInterleaved = b'ChnI'**

    - **CharcoalAmount = b'ChAm'**

    - **CharcoalArea = b'ChrA'**

    - **ChokeMatte = b'Ckmt'**

    - **ChromeFX = b'ChFX'**

    - **City = b'City'**

    - **ClearAmount = b'ClrA'**

    - **ClippingPath = b'ClPt'**

    - **ClippingPathEPS = b'ClpP'**

    - **ClippingPathFlatness = b'ClpF'**

    - **ClippingPathIndex = b'ClpI'**

    - **ClippingPathInfo = b'Clpg'**

    - **CloneSource = b'ClnS'**

    - **ClosedSubpath = b'Clsp'**

    - **Color = b'Clr '**

    - **ColorChannels = b'Clrh'**

    - **ColorCorrection = b'ClrC'**

    - **ColorIndicates = b'ClrI'**

    - **ColorManagement = b'ClMg'**

    - **ColorPickerPrefs = b'Clrr'**

    - **ColorSpace = b'ClrS'**

    - **ColorTable = b'ClrT'**

    - **Colorize = b'Clrz'**

    - **Colors = b'Clrs'**

    - **ColorsList = b'ClrL'**

    - **ColumnWidth = b'ClmW'**

    - **CommandKey = b'CmdK'**

    - **Compensation = b'Cmpn'**

    - **Compression = b'Cmpr'**

    - **Concavity = b'Cncv'**

    - **Condition = b'Cndt'**

    - **Constant = b'Cnst'**

    - **Constrain = b'Cnst'**

    - **ConstrainProportions = b'CnsP'**

    - **ConstructionFOV = b'Cfov'**

    - **Contiguous = b'Cntg'**

    - **Continue = b'Cntn'**

    - **Continuity = b'Cnty'**

    - **ContourType = b'ShpC'**

    - **Contrast = b'Cntr'**

    - **Convert = b'Cnvr'**

    - **Copy = b'Cpy '**

    - **Copyright = b'Cpyr'**

    - **CopyrightNotice = b'CprN'**

    - **CornerCropMarks = b'CrnC'**

    - **Count = b'Cnt '**

    - **CountryName = b'CntN'**

    - **CrackBrightness = b'CrcB'**

    - **CrackDepth = b'CrcD'**

    - **CrackSpacing = b'CrcS'**

    - **CreateLayersFromLayerFX = b'blfl'**

    - **Credit = b'Crdt'**

    - **Crossover = b'Crss'**

    - **Current = b'Crnt'**

    - **CurrentHistoryState = b'CrnH'**

    - **CurrentLight = b'CrnL'**

    - **CurrentToolOptions = b'CrnT'**

    - **Curve = b'Crv '**

    - **CurveFile = b'CrvF'**

    - **Custom = b'Cstm'**

    - **CustomForced = b'CstF'**

    - **CustomMatte = b'CstM'**

    - **CustomPalette = b'CstP'**

    - **Cyan = b'Cyn '**

    - **DCS = b'DCS '**

    - **DPXFormat = b'DPXf'**

    - **DarkIntensity = b'DrkI'**

    - **Darkness = b'Drkn'**

    - **DateCreated = b'DtCr'**

    - **Datum = b'Dt '**

    - **Definition = b'Dfnt'**

    - **Density = b'Dnst'**

    - **Depth = b'Dpth'**

    - **DestBlackMax = b'Dstl'**

    - **DestBlackMin = b'DstB'**

    - **DestWhiteMax = b'Dstt'**

    - **DestWhiteMin = b'DstW'**

    - **DestinationMode = b'DstM'**

    - **Detail = b'Dtl '**

    - **Diameter = b'Dmtr'**

    - **DiffusionDither = b'DffD'**

    - **Direction = b'Drct'**

    - **DirectionBalance = b'DrcB'**

    - **DisplaceFile = b'DspF'**

    - **DisplacementMap = b'DspM'**

    - **DisplayPrefs = b'DspP'**

    - **Distance = b'Dstn'**

    - **Distortion = b'Dstr'**

    - **Distribution = b'Dstr'**

    - **Dither = b'Dthr'**

    - **DitherAmount = b'DthA'**

    - **DitherPreserve = b'Dthp'**

    - **DitherQuality = b'Dthq'**

    - **DocumentID = b'DocI'**

    - **DotGain = b'DtGn'**

    - **DotGainCurves = b'DtGC'**

    - **DropShadow = b'DrSh'**

    - **Duplicate = b'Dplc'**

    - **DynamicColorSliders = b'DnmC'**

    - **Edge = b'Edg '**

    - **EdgeBrightness = b'EdgB'**

    - **EdgeFidelity = b'EdgF'**

    - **EdgeIntensity = b'EdgI'**

    - **EdgeSimplicity = b'EdgS'**

    - **EdgeThickness = b'EdgT'**

    - **EdgeWidth = b'EdgW'**

    - **Effect = b'Effc'**

    - **EmbedCMYK = b'EmbC'**

    - **EmbedGray = b'EmbG'**

    - **EmbedLab = b'EmbL'**

    - **EmbedProfiles = b'EmbP'**

    - **EmbedRGB = b'EmbR'**

    - **EmulsionDown = b'EmlD'**

    - **EnableGestures = b'EGst'**

    - **Enabled = b'enab'**

    - **Encoding = b'Encd'**

    - **End = b'End '**

    - **EndArrowhead = b'EndA'**

    - **EndRamp = b'EndR'**

    - **EndSustain = b'EndS'**

    - **Engine = b'Engn'**

    - **EraseToHistory = b'ErsT'**

    - **EraserKind = b'ErsK'**

    - **ExactPoints = b'ExcP'**

    - **Export = b'Expr'**

    - **ExportClipboard = b'ExpC'**

    - **Exposure = b'Exps'**

    - **Extend = b'Extd'**

    - **ExtendedQuality = b'EQlt'**

    - **Extension = b'Extn'**

    - **ExtensionsQuery = b'ExtQ'**

    - **ExtrudeDepth = b'ExtD'**

    - **ExtrudeMaskIncomplete = b'ExtM'**

    - **ExtrudeRandom = b'ExtR'**

    - **ExtrudeSize = b'ExtS'**

    - **ExtrudeSolidFace = b'ExtF'**

    - **ExtrudeType = b'ExtT'**

    - **EyeDropperSample = b'EyDr'**

    - **FPXCompress = b'FxCm'**

    - **FPXQuality = b'FxQl'**

    - **FPXSize = b'FxSz'**

    - **FPXView = b'FxVw'**

    - **FadeTo = b'FdT '**

    - **FadeoutSteps = b'FdtS'**

    - **Falloff = b'FlOf'**

    - **Feather = b'Fthr'**

    - **FiberLength = b'FbrL'**

    - **File = b'File'**

    - **FileCreator = b'FlCr'**

    - **FileInfo = b'FlIn'**

    - **FileReference = b'FilR'**

    - **FileSavePrefs = b'FlSP'**

    - **FileType = b'FlTy'**

    - **FilesList = b'flst'**

    - **Fill = b'Fl '**

    - **FillColor = b'FlCl'**

    - **FillNeutral = b'FlNt'**

    - **FilterLayerPersistentData = b'FlPd'**

    - **FilterLayerRandomSeed = b'FlRs'**

    - **Fingerpainting = b'Fngr'**

    - **FlareCenter = b'FlrC'**

    - **Flatness = b'Fltn'**

    - **Flatten = b'Fltt'**

    - **FlipVertical = b'FlpV'**

    - **Focus = b'Fcs '**

    - **Folders = b'Fldr'**

    - **FontDesignAxes = b'FntD'**

    - **FontDesignAxesVectors = b'FntV'**

    - **FontName = b'FntN'**

    - **FontScript = b'Scrp'**

    - **FontStyleName = b'FntS'**

    - **FontTechnology = b'FntT'**

    - **ForcedColors = b'FrcC'**

    - **ForegroundColor = b'FrgC'**

    - **ForegroundLevel = b'FrgL'**

    - **Format = b'Fmt '**

    - **Forward = b'Fwd '**

    - **FrameFX = b'FrFX'**

    - **FrameWidth = b'FrmW'**

    - **FreeTransformCenterState = b'FTcs'**

    - **Frequency = b'Frqn'**

    - **From = b'From'**

    - **FromBuiltin = b'FrmB'**

    - **FromMode = b'FrmM'**

    - **FunctionKey = b'FncK'**

    - **Fuzziness = b'Fzns'**

    - **GCR = b'GCR '**

    - **GIFColorFileType = b'GFPT'**

    - **GIFColorLimit = b'GFCL'**

    - **GIFExportCaption = b'GFEC'**

    - **GIFMaskChannelIndex = b'GFMI'**

    - **GIFMaskChannelInverted = b'GFMV'**

    - **GIFPaletteFile = b'GFPF'**

    - **GIFPaletteType = b'GFPL'**

    - **GIFRequiredColorSpaceType = b'GFCS'**

    - **GIFRowOrderType = b'GFIT'**

    - **GIFTransparentColor = b'GFTC'**

    - **GIFTransparentIndexBlue = b'GFTB'**

    - **GIFTransparentIndexGreen = b'GFTG'**

    - **GIFTransparentIndexRed = b'GFTR'**

    - **GIFUseBestMatch = b'GFBM'**

    - **Gamma = b'Gmm '**

    - **GamutWarning = b'GmtW'**

    - **GeneralPrefs = b'GnrP'**

    - **GlobalAngle = b'gblA'**

    - **GlobalLightingAngle = b'gagl'**

    - **Gloss = b'Glos'**

    - **GlowAmount = b'GlwA'**

    - **GlowTechnique = b'GlwT'**

    - **Gradient = b'Grad'**

    - **GradientFill = b'Grdf'**

    - **Grain = b'Grn '**

    - **GrainType = b'Grnt'**

    - **Graininess = b'Grns'**

    - **Gray = b'Gry '**

    - **GrayBehavior = b'GrBh'**

    - **GraySetup = b'GrSt'**

    - **Green = b'Grn '**

    - **GreenBlackPoint = b'GrnB'**

    - **GreenFloat = b'greenFloat'**

    - **GreenGamma = b'GrnG'**

    - **GreenWhitePoint = b'GrnW'**

    - **GreenX = b'GrnX'**

    - **GreenY = b'GrnY'**

    - **GridColor = b'GrdC'**

    - **GridCustomColor = b'Grds'**

    - **GridMajor = b'GrdM'**

    - **GridMinor = b'Grdn'**

    - **GridStyle = b'GrdS'**

    - **GridUnits = b'Grdt'**

    - **Group = b'Grup'**

    - **GroutWidth = b'GrtW'**

    - **GrowSelection = b'GrwS'**

    - **Guides = b'Gdes'**

    - **GuidesColor = b'GdsC'**

    - **GuidesCustomColor = b'Gdss'**

    - **GuidesPrefs = b'GdPr'**

    - **GuidesStyle = b'GdsS'**

    - **GutterWidth = b'GttW'**

    - **HalftoneFile = b'HlfF'**

    - **HalftoneScreen = b'HlfS'**

    - **HalftoneSize = b'HlSz'**

    - **HalftoneSpec = b'Hlfp'**

    - **Hardness = b'Hrdn'**

    - **HasCmdHPreference = b'HCdH'**

    - **Header = b'Hdr '**

    - **Headline = b'Hdln'**

    - **Height = b'Hght'**

    - **HighlightArea = b'HghA'**

    - **HighlightColor = b'hglC'**

    - **HighlightLevels = b'HghL'**

    - **HighlightMode = b'hglM'**

    - **HighlightOpacity = b'hglO'**

    - **HighlightStrength = b'HghS'**

    - **HistoryBrushSource = b'HstB'**

    - **HistoryPrefs = b'HstP'**

    - **HistoryStateSource = b'HsSS'**

    - **HistoryStates = b'HsSt'**

    - **Horizontal = b'Hrzn'**

    - **HorizontalScale = b'HrzS'**

    - **HostName = b'HstN'**

    - **HostVersion = b'HstV'**

    - **Hue = b'H '**

    - **ICCEngine = b'ICCE'**

    - **ICCSetupName = b'ICCt'**

    - **ID = b'Idnt'**

    - **Idle = b'Idle'**

    - **ImageBalance = b'ImgB'**

    - **Import = b'Impr'**

    - **Impressionist = b'Imps'**

    - **In = b'In '**

    - **Inherits = b'c@#^'**

    - **InkColors = b'InkC'**

    - **Inks = b'Inks'**

    - **InnerGlow = b'IrGl'**

    - **InnerGlowSource = b'glwS'**

    - **InnerShadow = b'IrSh'**

    - **Input = b'Inpt'**

    - **InputBlackPoint = b'kIBP'**

    - **InputMapRange = b'Inmr'**

    - **InputRange = b'Inpr'**

    - **InputWhitePoint = b'kIWP'**

    - **Intensity = b'Intn'**

    - **Intent = b'Inte'**

    - **InterfaceBevelHighlight = b'IntH'**

    - **InterfaceBevelShadow = b'Intv'**

    - **InterfaceBlack = b'IntB'**

    - **InterfaceBorder = b'Intd'**

    - **InterfaceButtonDarkShadow = b'Intk'**

    - **InterfaceButtonDownFill = b'Intt'**

    - **InterfaceButtonUpFill = b'InBF'**

    - **InterfaceColorBlue2 = b'ICBL'**

    - **InterfaceColorBlue32 = b'ICBH'**

    - **InterfaceColorGreen2 = b'ICGL'**

    - **InterfaceColorGreen32 = b'ICGH'**

    - **InterfaceColorRed2 = b'ICRL'**

    - **InterfaceColorRed32 = b'ICRH'**

    - **InterfaceIconFillActive = b'IntI'**

    - **InterfaceIconFillDimmed = b'IntF'**

    - **InterfaceIconFillSelected = b'Intc'**

    - **InterfaceIconFrameActive = b'Intm'**

    - **InterfaceIconFrameDimmed = b'Intr'**

    - **InterfaceIconFrameSelected = b'IntS'**

    - **InterfacePaletteFill = b'IntP'**

    - **InterfaceRed = b'IntR'**

    - **InterfaceToolTipBackground = b'IntT'**

    - **InterfaceToolTipText = b'ITTT'**

    - **InterfaceTransparencyBackground = b'ITBg'**

    - **InterfaceTransparencyForeground = b'ITFg'**

    - **InterfaceWhite = b'IntW'**

    - **Interlace = b'Intr'**

    - **InterlaceCreateType = b'IntC'**

    - **InterlaceEliminateType = b'IntE'**

    - **Interpolation = b'Intr'**

    - **InterpolationMethod = b'IntM'**

    - **Invert = b'Invr'**

    - **InvertMask = b'InvM'**

    - **InvertSource2 = b'InvS'**

    - **InvertTexture = b'InvT'**

    - **IsDirty = b'IsDr'**

    - **ItemIndex = b'ItmI'**

    - **JPEGQuality = b'JPEQ'**

    - **Kerning = b'Krng'**

    - **Keywords = b'Kywd'**

    - **Kind = b'Knd '**

    - **LUTAnimation = b'LTnm'**

    - **LZWCompression = b'LZWC'**

    - **Labels = b'Lbls'**

    - **Landscape = b'Lnds'**

    - **LastTransform = b'LstT'**

    - **Layer = b'Lyr '**

    - **LayerEffects = b'Lefx'**

    - **LayerFXVisible = b'lfxv'**

    - **LayerID = b'LyrI'**

    - **LayerName = b'LyrN'**

    - **Layers = b'Lyrs'**

    - **Leading = b'Ldng'**

    - **Left = b'Left'**

    - **LegacySerialString = b'lSNs'**

    - **Length = b'Lngt'**

    - **Lens = b'Lns '**

    - **Level = b'Lvl '**

    - **Levels = b'Lvls'**

    - **LightDark = b'LgDr'**

    - **LightDirection = b'LghD'**

    - **LightIntensity = b'LghI'**

    - **LightPosition = b'LghP'**

    - **LightSource = b'LghS'**

    - **LightType = b'LghT'**

    - **LightenGrout = b'LghG'**

    - **Lightness = b'Lght'**

    - **Line = b'Line'**

    - **LinkEnable = b'lnkE'**

    - **LinkedLayerIDs = b'LnkL'**

    - **LocalLightingAltitude = b'Lald'**

    - **LocalLightingAngle = b'lagl'**

    - **LocalRange = b'LclR'**

    - **Location = b'Lctn'**

    - **Log = b'Log '**

    - **Logarithmic = b'kLog'**

    - **LowerCase = b'LwCs'**

    - **Luminance = b'Lmnc'**

    - **Magenta = b'Mgnt'**

    - **MakeVisible = b'MkVs'**

    - **ManipulationFOV = b'Mfov'**

    - **MapBlack = b'MpBl'**

    - **Mapping = b'Mpng'**

    - **MappingShape = b'MpgS'**

    - **Material = b'Mtrl'**

    - **Matrix = b'Mtrx'**

    - **MatteColor = b'MttC'**

    - **Maximum = b'Mxm '**

    - **MaximumStates = b'MxmS'**

    - **MemoryUsagePercent = b'MmrU'**

    - **Merge = b'Mrge'**

    - **Merged = b'Mrgd'**

    - **Message = b'Msge'**

    - **Method = b'Mthd'**

    - **MezzotintType = b'MztT'**

    - **Midpoint = b'Mdpn'**

    - **MidtoneLevels = b'MdtL'**

    - **Minimum = b'Mnm '**

    - **MismatchCMYK = b'MsmC'**

    - **MismatchGray = b'MsmG'**

    - **MismatchRGB = b'MsmR'**

    - **Mode = b'Md '**

    - **Monochromatic = b'Mnch'**

    - **MoveTo = b'MvT '**

    - **Name = b'Nm '**

    - **Negative = b'Ngtv'**

    - **New = b'Nw '**

    - **Noise = b'Nose'**

    - **NonImageData = b'NnIm'**

    - **NonLinear = b'NnLn'**

    - **Null = b'null'**

    - **NumLights = b'Nm L'**

    - **Number = b'Nmbr'**

    - **NumberOfCacheLevels = b'NCch'**

    - **NumberOfCacheLevels64 = b'NC64'**

    - **NumberOfChannels = b'NmbO'**

    - **NumberOfChildren = b'NmbC'**

    - **NumberOfDocuments = b'NmbD'**

    - **NumberOfGenerators = b'NmbG'**

    - **NumberOfLayers = b'NmbL'**

    - **NumberOfLevels = b'NmbL'**

    - **NumberOfPaths = b'NmbP'**

    - **NumberOfRipples = b'NmbR'**

    - **NumberOfSiblings = b'NmbS'**

    - **ObjectName = b'ObjN'**

    - **Offset = b'Ofst'**

    - **OldSmallFontType = b'Sftt'**

    - **On = b'On '**

    - **Opacity = b'Opct'**

    - **Optimized = b'Optm'**

    - **Orientation = b'Ornt'**

    - **OriginalHeader = b'OrgH'**

    - **OriginalTransmissionReference = b'OrgT'**

    - **OtherCursors = b'OthC'**

    - **OuterGlow = b'OrGl'**

    - **Output = b'Otpt'**

    - **OutputBlackPoint = b'kOBP'**

    - **OutputWhitePoint = b'kOWP'**

    - **OverprintColors = b'OvrC'**

    - **OverrideOpen = b'OvrO'**

    - **OverridePrinter = b'ObrP'**

    - **OverrideSave = b'Ovrd'**

    - **PNGFilter = b'PNGf'**

    - **PNGInterlaceType = b'PGIT'**

    - **PageFormat = b'PMpf'**

    - **PageNumber = b'PgNm'**

    - **PagePosition = b'PgPs'**

    - **PageSetup = b'PgSt'**

    - **PaintCursorKind = b'PnCK'**

    - **PaintType = b'PntT'**

    - **PaintingCursors = b'PntC'**

    - **Palette = b'Plt '**

    - **PaletteFile = b'PltF'**

    - **PaperBrightness = b'PprB'**

    - **ParentIndex = b'PrIn'**

    - **ParentName = b'PrNm'**

    - **Path = b'Path'**

    - **PathContents = b'PthC'**

    - **PathName = b'PthN'**

    - **Pattern = b'Pttn'**

    - **PencilWidth = b'Pncl'**

    - **PerspectiveIndex = b'Prsp'**

    - **Phosphors = b'Phsp'**

    - **PickerID = b'PckI'**

    - **PickerKind = b'Pckr'**

    - **PixelPaintSize = b'PPSz'**

    - **Platform = b'Pltf'**

    - **PluginFolder = b'PlgF'**

    - **PluginPrefs = b'PlgP'**

    - **Points = b'Pts '**

    - **Position = b'Pstn'**

    - **PostScriptColor = b'PstS'**

    - **Posterization = b'Pstr'**

    - **PredefinedColors = b'PrdC'**

    - **PreferBuiltin = b'PrfB'**

    - **Preferences = b'Prfr'**

    - **PreserveAdditional = b'PrsA'**

    - **PreserveLuminosity = b'PrsL'**

    - **PreserveTransparency = b'PrsT'**

    - **Pressure = b'Prs '**

    - **Preview = b'Prvw'**

    - **PreviewCMYK = b'PrvK'**

    - **PreviewFullSize = b'PrvF'**

    - **PreviewIcon = b'PrvI'**

    - **PreviewMacThumbnail = b'PrvM'**

    - **PreviewWinThumbnail = b'PrvW'**

    - **PreviewsQuery = b'PrvQ'**

    - **PrintSettings = b'PMps'**

    - **ProfileSetup = b'PrfS'**

    - **ProvinceState = b'PrvS'**

    - **Quality = b'Qlty'**

    - **QuickMask = b'QucM'**

    - **RGBSetup = b'RGBS'**

    - **Radius = b'Rds '**

    - **RandomSeed = b'RndS'**

    - **Ratio = b'Rt '**

    - **RecentFiles = b'Rcnf'**

    - **Red = b'Rd '**

    - **RedBlackPoint = b'RdBl'**

    - **RedFloat = b'redFloat'**

    - **RedGamma = b'RdGm'**

    - **RedWhitePoint = b'RdWh'**

    - **RedX = b'RdX '**

    - **RedY = b'RdY '**

    - **RegistrationMarks = b'RgsM'**

    - **Relative = b'Rltv'**

    - **Relief = b'Rlf '**

    - **RenderFidelity = b'Rfid'**

    - **Resample = b'Rsmp'**

    - **ResizeWindowsOnZoom = b'RWOZ'**

    - **Resolution = b'Rslt'**

    - **ResourceID = b'RsrI'**

    - **Response = b'Rspn'**

    - **RetainHeader = b'RtnH'**

    - **Reverse = b'Rvrs'**

    - **Right = b'Rght'**

    - **RippleMagnitude = b'RplM'**

    - **RippleSize = b'RplS'**

    - **Rotate = b'Rtt '**

    - **Roundness = b'Rndn'**

    - **RulerOriginH = b'RlrH'**

    - **RulerOriginV = b'RlrV'**

    - **RulerUnits = b'RlrU'**

    - **Saturation = b'Strt'**

    - **SaveAndClose = b'SvAn'**

    - **SaveComposite = b'SvCm'**

    - **SavePaletteLocations = b'PltL'**

    - **SavePaths = b'SvPt'**

    - **SavePyramids = b'SvPy'**

    - **Saving = b'Svng'**

    - **Scale = b'Scl '**

    - **ScaleHorizontal = b'SclH'**

    - **ScaleVertical = b'SclV'**

    - **Scaling = b'Scln'**

    - **Scans = b'Scns'**

    - **ScratchDisks = b'ScrD'**

    - **ScreenFile = b'ScrF'**

    - **ScreenType = b'ScrT'**

    - **Separations = b'Sprt'**

    - **SerialString = b'SrlS'**

    - **ShadingIntensity = b'ShdI'**

    - **ShadingNoise = b'ShdN'**

    - **ShadingShape = b'ShdS'**

    - **ShadowColor = b'sdwC'**

    - **ShadowIntensity = b'ShdI'**

    - **ShadowLevels = b'ShdL'**

    - **ShadowMode = b'sdwM'**

    - **ShadowOpacity = b'sdwO'**

    - **Shape = b'Shp '**

    - **Sharpness = b'Shrp'**

    - **ShearEd = b'ShrE'**

    - **ShearPoints = b'ShrP'**

    - **ShearSt = b'ShrS'**

    - **ShiftKey = b'ShfK'**

    - **ShiftKeyToolSwitch = b'ShKT'**

    - **ShortNames = b'ShrN'**

    - **ShowEnglishFontNames = b'ShwE'**

    - **ShowMenuColors = b'SwMC'**

    - **ShowToolTips = b'ShwT'**

    - **ShowTransparency = b'ShTr'**

    - **SizeKey = b'Sz '**

    - **Skew = b'Skew'**

    - **SmallFontType = b'Sfts'**

    - **SmartBlurMode = b'SmBM'**

    - **SmartBlurQuality = b'SmBQ'**

    - **Smooth = b'Smoo'**

    - **Smoothness = b'Smth'**

    - **SnapshotInitial = b'SnpI'**

    - **SoftClip = b'SfCl'**

    - **Softness = b'Sftn'**

    - **SolidFill = b'SoFi'**

    - **Source = b'Srce'**

    - **Source2 = b'Src2'**

    - **SourceMode = b'SrcM'**

    - **Spacing = b'Spcn'**

    - **SpecialInstructions = b'SpcI'**

    - **SpherizeMode = b'SphM'**

    - **Spot = b'Spot'**

    - **SprayRadius = b'SprR'**

    - **SquareSize = b'SqrS'**

    - **SrcBlackMax = b'Srcl'**

    - **SrcBlackMin = b'SrcB'**

    - **SrcWhiteMax = b'Srcm'**

    - **SrcWhiteMin = b'SrcW'**

    - **Start = b'Strt'**

    - **StartArrowhead = b'StrA'**

    - **State = b'Stte'**

    - **Strength = b'srgh'**

    - **StrengthRatio = b'srgR'**

    - **Strength\_PLUGIN = b'Strg'**

    - **StrokeDetail = b'StDt'**

    - **StrokeDirection = b'SDir'**

    - **StrokeLength = b'StrL'**

    - **StrokePressure = b'StrP'**

    - **StrokeSize = b'StrS'**

    - **StrokeWidth = b'StrW'**

    - **Style = b'Styl'**

    - **Styles = b'Stys'**

    - **StylusIsColor = b'StlC'**

    - **StylusIsOpacity = b'StlO'**

    - **StylusIsPressure = b'StlP'**

    - **StylusIsSize = b'StlS'**

    - **SubPathList = b'SbpL'**

    - **SupplementalCategories = b'SplC'**

    - **SystemInfo = b'SstI'**

    - **SystemPalette = b'SstP'**

    - **Target = b'null'**

    - **TargetPath = b'Trgp'**

    - **TargetPathIndex = b'TrgP'**

    - **TermLength = b'Lngt'**

    - **Text = b'Txt '**

    - **TextClickPoint = b'TxtC'**

    - **TextData = b'TxtD'**

    - **TextStyle = b'TxtS'**

    - **TextStyleRange = b'Txtt'**

    - **Texture = b'Txtr'**

    - **TextureCoverage = b'TxtC'**

    - **TextureFile = b'TxtF'**

    - **TextureType = b'TxtT'**

    - **Threshold = b'Thsh'**

    - **TileNumber = b'TlNm'**

    - **TileOffset = b'TlOf'**

    - **TileSize = b'TlSz'**

    - **Title = b'Ttl '**

    - **To = b'T '**

    - **ToBuiltin = b'TBl '**

    - **ToLinked = b'ToLk'**

    - **ToMode = b'TMd '**

    - **ToggleOthers = b'TglO'**

    - **Tolerance = b'Tlrn'**

    - **Top = b'Top '**

    - **TotalLimit = b'TtlL'**

    - **Tracking = b'Trck'**

    - **TransferFunction = b'TrnF'**

    - **TransferSpec = b'TrnS'**

    - **Transparency = b'Trns'**

    - **TransparencyGrid = b'TrnG'**

    - **TransparencyGridColors = b'TrnC'**

    - **TransparencyGridSize = b'TrnG'**

    - **TransparencyPrefs = b'TrnP'**

    - **TransparencyShape = b'TrnS'**

    - **TransparentIndex = b'TrnI'**

    - **TransparentWhites = b'TrnW'**

    - **Twist = b'Twst'**

    - **Type = b'Type'**

    - **UCA = b'UC '**

    - **URL = b'URL '**

    - **UndefinedArea = b'UndA'**

    - **Underline = b'Undl'**

    - **UnitsPrefs = b'UntP'**

    - **Untitled = b'Untl'**

    - **UpperY = b'UppY'**

    - **Urgency = b'Urgn'**

    - **UseAccurateScreens = b'AcrS'**

    - **UseAdditionalPlugins = b'AdPl'**

    - **UseCacheForHistograms = b'UsCc'**

    - **UseCurves = b'UsCr'**

    - **UseDefault = b'UsDf'**

    - **UseGlobalAngle = b'uglg'**

    - **UseICCProfile = b'UsIC'**

    - **UseMask = b'UsMs'**

    - **UserMaskEnabled = b'UsrM'**

    - **UserMaskLinked = b'Usrs'**

    - **Using = b'Usng'**

    - **Value = b'Vl '**

    - **Variance = b'Vrnc'**

    - **Vector0 = b'Vct0'**

    - **Vector1 = b'Vct1'**

    - **VectorColor = b'VctC'**

    - **VersionFix = b'VrsF'**

    - **VersionMajor = b'VrsM'**

    - **VersionMinor = b'VrsN'**

    - **Vertical = b'Vrtc'**

    - **VerticalScale = b'VrtS'**

    - **VideoAlpha = b'Vdlp'**

    - **Visible = b'Vsbl'**

    - **WatchSuspension = b'WtcS'**

    - **Watermark = b'watr'**

    - **WaveType = b'Wvtp'**

    - **WavelengthMax = b'WLMx'**

    - **WavelengthMin = b'WLMn'**

    - **WebdavPrefs = b'WbdP'**

    - **WetEdges = b'Wtdg'**

    - **What = b'What'**

    - **WhiteClip = b'WhtC'**

    - **WhiteIntensity = b'WhtI'**

    - **WhiteIsHigh = b'WhHi'**

    - **WhiteLevel = b'WhtL'**

    - **WhitePoint = b'WhtP'**

    - **WholePath = b'WhPt'**

    - **Width = b'Wdth'**

    - **WindMethod = b'WndM'**

    - **With = b'With'**

    - **WorkPath = b'WrPt'**

    - **WorkPathIndex = b'WrkP'**

    - **X = b'X '**

    - **Y = b'Y '**

    - **Yellow = b'Ylw '**

    - **ZigZagType = b'ZZTy'**

    - **\_3DAntiAlias = b'Alis'**

    - **comp = b'comp'**

    ### Type

- **class psd\_tools.terminology.Type(value, names=\<not given\>, \*values, module=None, qualname=None, type=None, start=1, boundary=None)**

  Type definitions extracted from PITerminology.h.

  See *https://www.adobe.com/devnet/photoshop/sdk.html*

  - **ActionData = b'ActD'**

    - **ActionReference = b'#Act'**

    - **AlignDistributeSelector = b'ADSt'**

    - **Alignment = b'Alg '**

    - **Amount = b'Amnt'**

    - **AntiAlias = b'Annt'**

    - **AreaSelector = b'ArSl'**

    - **AssumeOptions = b'AssO'**

    - **BevelEmbossStampStyle = b'BESs'**

    - **BevelEmbossStyle = b'BESl'**

    - **BitDepth = b'BtDp'**

    - **BlackGeneration = b'BlcG'**

    - **BlendMode = b'BlnM'**

    - **BlurMethod = b'BlrM'**

    - **BlurQuality = b'BlrQ'**

    - **BrushType = b'BrsT'**

    - **BuiltInContour = b'BltC'**

    - **BuiltinProfile = b'BltP'**

    - **CMYKSetupEngine = b'CMYE'**

    - **Calculation = b'Clcn'**

    - **Channel = b'Chnl'**

    - **ChannelReference = b'#ChR'**

    - **CheckerboardSize = b'Chck'**

    - **ClassColor = b'#Clr'**

    - **ClassElement = b'#ClE'**

    - **ClassExport = b'#Cle'**

    - **ClassFormat = b'#ClF'**

    - **ClassHueSatHueSatV2 = b'#HsV'**

    - **ClassImport = b'#ClI'**

    - **ClassMode = b'#ClM'**

    - **ClassStringFormat = b'#ClS'**

    - **ClassTextExport = b'#CTE'**

    - **ClassTextImport = b'#ClT'**

    - **Color = b'Clr '**

    - **ColorChannel = b'#ClC'**

    - **ColorPalette = b'ClrP'**

    - **ColorSpace = b'ClrS'**

    - **ColorStopType = b'Clry'**

    - **Colors = b'Clrs'**

    - **Compensation = b'Cmpn'**

    - **ContourEdge = b'CntE'**

    - **Convert = b'Cnvr'**

    - **CorrectionMethod = b'CrcM'**

    - **CursorKind = b'CrsK'**

    - **DCS = b'DCS '**

    - **DeepDepth = b'DpDp'**

    - **Depth = b'Dpth'**

    - **DiffuseMode = b'DfsM'**

    - **Direction = b'Drct'**

    - **DisplacementMap = b'DspM'**

    - **Distribution = b'Dstr'**

    - **Dither = b'Dthr'**

    - **DitherQuality = b'Dthq'**

    - **DocumentReference = b'#DcR'**

    - **EPSPreview = b'EPSP'**

    - **ElementReference = b'#ElR'**

    - **Encoding = b'Encd'**

    - **EraserKind = b'ErsK'**

    - **ExtrudeRandom = b'ExtR'**

    - **ExtrudeType = b'ExtT'**

    - **EyeDropperSample = b'EyDp'**

    - **FPXCompress = b'FxCm'**

    - **Fill = b'Fl '**

    - **FillColor = b'FlCl'**

    - **FillContents = b'FlCn'**

    - **FillMode = b'FlMd'**

    - **ForcedColors = b'FrcC'**

    - **FrameFill = b'FrFl'**

    - **FrameStyle = b'FStl'**

    - **GIFColorFileType = b'GFPT'**

    - **GIFPaletteType = b'GFPL'**

    - **GIFRequiredColorSpaceType = b'GFCS'**

    - **GIFRowOrderType = b'GFIT'**

    - **GlobalClass = b'GlbC'**

    - **GlobalObject = b'GlbO'**

    - **GradientForm = b'GrdF'**

    - **GradientType = b'GrdT'**

    - **GrainType = b'Grnt'**

    - **GrayBehavior = b'GrBh'**

    - **GuideGridColor = b'GdGr'**

    - **GuideGridStyle = b'GdGS'**

    - **HistoryStateSource = b'HstS'**

    - **HorizontalLocation = b'HrzL'**

    - **ImageReference = b'#ImR'**

    - **InnerGlowSource = b'IGSr'**

    - **IntegerChannel = b'#inC'**

    - **Intent = b'Inte'**

    - **InterlaceCreateType = b'IntC'**

    - **InterlaceEliminateType = b'IntE'**

    - **Interpolation = b'Intp'**

    - **Kelvin = b'Klvn'**

    - **KelvinCustomWhitePoint = b'#Klv'**

    - **Lens = b'Lns '**

    - **LightDirection = b'LghD'**

    - **LightPosition = b'LghP'**

    - **LightType = b'LghT'**

    - **LocationReference = b'#Lct'**

    - **MaskIndicator = b'MskI'**

    - **MatteColor = b'MttC'**

    - **MatteTechnique = b'BETE'**

    - **MenuItem = b'MnIt'**

    - **Method = b'Mthd'**

    - **MezzotintType = b'MztT'**

    - **Mode = b'Md '**

    - **Notify = b'Ntfy'**

    - **Object = b'Objc'**

    - **ObjectReference = b'obj '**

    - **OnOff = b'OnOf'**

    - **Ordinal = b'Ordn'**

    - **Orientation = b'Ornt'**

    - **PNGFilter = b'PNGf'**

    - **PNGInterlaceType = b'PGIT'**

    - **PagePosition = b'PgPs'**

    - **PathKind = b'PthK'**

    - **PathReference = b'#PtR'**

    - **Phosphors = b'Phsp'**

    - **PhosphorsCustomPhosphors = b'#Phs'**

    - **PickerKind = b'PckK'**

    - **PixelPaintSize = b'PPSz'**

    - **Platform = b'Pltf'**

    - **Preview = b'Prvw'**

    - **PreviewCMYK = b'Prvt'**

    - **ProfileMismatch = b'PrfM'**

    - **PurgeItem = b'PrgI'**

    - **QuadCenterState = b'QCSt'**

    - **Quality = b'Qlty'**

    - **QueryState = b'QurS'**

    - **RGBSetupSource = b'RGBS'**

    - **RawData = b'tdta'**

    - **RippleSize = b'RplS'**

    - **RulerUnits = b'RlrU'**

    - **ScreenType = b'ScrT'**

    - **Shape = b'Shp '**

    - **SmartBlurMode = b'SmBM'**

    - **SmartBlurQuality = b'SmBQ'**

    - **SourceMode = b'Cndn'**

    - **SpherizeMode = b'SphM'**

    - **State = b'Stte'**

    - **StringChannel = b'#sth'**

    - **StringClassFormat = b'#StC'**

    - **StringCompensation = b'#Stm'**

    - **StringFSS = b'#Stf'**

    - **StringInteger = b'#StI'**

    - **StrokeDirection = b'StrD'**

    - **StrokeLocation = b'StrL'**

    - **TextureType = b'TxtT'**

    - **TransparencyGridColors = b'Trnl'**

    - **TransparencyGridSize = b'TrnG'**

    - **TypeClassModeOrClassMode = b'#TyM'**

    - **UndefinedArea = b'UndA'**

    - **UnitFloat = b'UntF'**

    - **Urgency = b'Urgn'**

    - **UserMaskOptions = b'UsrM'**

    - **ValueList = b'VlLs'**

    - **VerticalLocation = b'VrtL'**

    - **WaveType = b'Wvtp'**

    - **WindMethod = b'WndM'**

    - **YesNo = b'YsN '**

    - **ZigZagType = b'ZZTy'**

    ### Unit

- **class psd\_tools.terminology.Unit(value, names=\<not given\>, \*values, module=None, qualname=None, type=None, start=1, boundary=None)**

  Unit definitions extracted from PITerminology.h.

  See *https://www.adobe.com/devnet/photoshop/sdk.html*

  - **Angle = b'#Ang'**

    - **Density = b'#Rsl'**

    - **Distance = b'#Rlt'**

    - **Millimeters = b'#Mlm'**

    - **Percent = b'#Prc'**

    - **Pixels = b'#Pxl'**

    - **Points = b'#Pnt'**

    - **\_None = b'#Nne'**

    ## INDICES AND TABLES

- •

  *Index*

- •

  *Module Index*

- •

  *Search Page*

## AUTHOR

Kota Yamaguchi

## COPYRIGHT

2019, Kota Yamaguchi
