Fork of psd-tools for working with Photoshop PSD files


Keywords
photoshop psd pil pillow, photoshop, psd, psd-files, psd-parsing-library, python
License
MIT
Install
pip install psd-tools2==1.8.7

Documentation

psd-tools2

psd-tools2 is a Python package for working with Adobe Photoshop PSD files as described in specification. psd-tools2 is a fork of psd-tools that implements various functionalities.

PyPI Version Build Status Document Status

Installation

Use pip to install the package:

pip install psd-tools2

Note

In order to extract images from 32bit PSD files PIL/Pillow must be built with LITTLECMS or LITTLECMS2 support.

For complete layer image composition functionality, also install NumPy/SciPy. This will be only necessary when the PSD files are saved without maximized compatibility and the image contains gradient fill:

pip install numpy scipy

Getting started

from psd_tools2 import PSDImage

psd = PSDImage.open('example.psd')
psd.compose().save('example.png')

for layer in psd:
    print(layer)

Check out the documentation for details.

Features

Supported:

  • Read and write of the low-level PSD/PSB file structure;
  • Raw layer image export;
  • ICC profile handling for sRGB images.

Limited support:

  • Composition of basic pixel-based layers by normal blending;
  • Composition of fill layer effects;
  • Editing of some layer attributes such as layer name.

Not supported:

  • Editing of layer structure, such as adding or removing a layer.
  • Blending modes other than normal;
  • Composition of layer effects;
  • Drawing of bezier curves;
  • Font rendering.

Contributing

See contributing page.