psd library SDK

Have you ever wanted to:

  • load data directly from a binary .PSD file?
  • extract layer data without having to rely on Photoshop scripts or actions to do the work for you?
  • tell artists that they can just work with .PSD files directly, without having to save images to an intermediate graphics format first?
  • use the layered structure of Photoshop files to group related assets, rather than storing them in several files?
  • store your own image data in layers in Photoshop files?
If any of that sounds familiar, you will enjoy what our library has to offer. It can be integrated into your own game engine and/or asset pipeline, enabling you to directly load data from Photoshop .PSD files. This can be a huge time saver for the whole team, because developers don't need to export their Photoshop data into individual files any longer.

Library features

  • Full layer hierarchy

    The SDK understands groups, layers, Smart Objects, and any kind of complex and nested layer setup. Group and layer names as well as other layer specific data is also loaded.

  • All bit depths supported

    The SDK supports loading 8-bit, 16-bit, and 32-bit data in Grayscale and RGB Color mode.

  • User & vector masks

    The library fully supports extracting user & vector masks on both groups and layers, in addition to mask specific data such as feather and density.

  • Total control

    The SDK allows fine-grained control over what kind of data is extracted, allowing you to only load what you really need.

  • Transparency & additional alpha channels

    The SDK is able to extract transparency masks and additional alpha channels 1:1, without pre-multiplying their content.

  • Export functionality

    The SDK can export layers and transparency data to Grayscale and RGB Color mode .PSD files, supporting all compression types known to Photoshop.

Code features

  • Lightweight C++, C-like library

    The code is written using only a subset of available C++ features, and does not use the STL, RTTI, Multiple Inheritance, or Exceptions. It favors simple data structures over complex inheritance trees.

  • No C++11

    Except for nullptr and static_assert, the code does not make use of any C++11-only features, thus making it compile on a wide range of different compilers.

  • No symbol clashes

    All code is contained within a single, configurable namespace, so that you will never experience symbol clashes with your own code.

  • No external dependencies

    The code does not need any external dependencies to be set up in order to compile. The only 3rd-party dependency miniz is already included.

  • Two-step loading

    The code features a two-step loading API: a very fast parsing step, followed by fully configurable and parallelizable data extraction using async I/O without any seek operations. Threading is controlled by you.

  • Full control

    As is standard in the games industry, the code grants total control over all memory allocations and file accesses using interfaces. Additionally, default native implementations are already provided, making everything work right out of the box.

  • Optimized code paths

    Where applicable, the code makes use of platform-specific intrinsics and vectorized instruction sets (SSE2) for bulk work.

  • Clean code

    The code compiles cleanly under several versions of Visual Studio (2008, 2010, 2012, 2013, 2015, 2017, 2019), even with -Wall applied.

  • Easy integration

    Building the code from scratch or adding it to an existing project is as simple as dropping the provided source files into Visual Studio. No external #defines or #includes need to be set up.

What you get

  • psdSdk
    Full C++ source code
  • psdSdk
    Visual Studio setup
  • psdSdk
    Sample code
  • Full C++ source code

    We know how crucial it is to have access to all code during development, be it for getting a better understanding of what happens under the hood, or for debugging purposes. As a logical consequence, the library ships with the complete C++ source code provided.

  • Visual Studio setup

    In addition to the full source code, the SDK provides complete solutions and project files for Visual Studio 2008, 2010, 2012, 2013, 2015, 2017, and 2019. With everything already set up for you, rebuilding the library is as easy as firing up Visual Studio, and hitting the Build button.

  • Sample code

    In order to get you started right away, the SDK also ships with sample code that shows how to utilize the different parts of the library. Using the provided code, you will be loading and exporting all kinds of data from .PSD files in less than a few hours.

Available versions

Since March 2020, the SDK is freely available on GitHub, licensed under the BSD 2-Clause license.