Skip to content

Instantly share code, notes, and snippets.

Last active September 1, 2023 09:15
  • Star 47 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?

Last updated 2020/03/04

Some links from twitter on the topic of parsing PSD files (haven't looked into them in details). PSD include a flattened rasterized image so this is easy to load if that's the only thing you need. Most software / librairies have support for extracting this flattened data (e.g. stb_image.h does).

However if you want access to individual layers, render non-rasterized layers, emulate every photoshop features, extract or apply effects with more granularity, more code is needed. May range from easy to lots-of-work depending on what exactly you need.

As far as I know there isn't a trivial stb-like ready-to-use C++ library to do that sort of things. Posting all links here. Some are probably bloated or hard to use into your project, some lacking features.

TODO: Actually look into the pros/cons of all those.

Adobe Photoshop File Formats Specification (October 2013)

GIMP, Krita, ImageMagick are open-source software with some support for PSD features

DevIL (Developer's Image Library) support some PSD features


@donzanoid "that said many current psd source dists derive from this:"

@donzanoid "this guy goes round the houses to use that source to do what you want, export layers to png"

@donzanoid "slightly simpler (one c/h) but not as feature complete"

psdslayer tool

Molecular Matters' psd library SDK (possibly the best of this list, comes with sources, but at a cost)

Molecular Matter's psd extract tool
March 2020: this is now open-source:

pixelprobe psd parser (Java)

Paint.NET PSD Plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment