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.

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

  • 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