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


Use pip to install the package:

pip install psd-tools


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)

For complete layer image composition functionality, also install NumPy/SciPy:

pip install numpy scipy

Numpy will be necessary when:

  • Blending modes other than normal are used;
  • Gradient fill is used.

Getting started

from psd_tools import PSDImage

psd ='example.psd')

for layer in psd:

Check out the Usage documentation for more examples.



  • 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:

  • Bitmap image export;
  • 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.

Indices and tables