How to Export Layers of a Photoshop (.psd) file Individually with GIMP [Ubuntu 19.10 Guide]

Image for post
Image for post

Today’s post is a rather specific how-to. I started receiving asset files from my artist in Photoshop format (.PSD) and all the assets were included in the same file (picture below). To use the assets in my game in Unity, I needed to get each one as a separate .PNG or compatible sprite format. Before asking my artist to give me individual sprites, I thought I’d do a bit of research myself.

Image for post
Image for post

GIMP is a great cross-platform photo editing tool. What I like the most about it that it is FREE and open source and has a plethora of tools, filters and plugins to work with. It can open .PSD files but not export individual layers to their own files.

After a bit of googling I came across a plugin for GIMP that does exactly what I wanted!

If you are not a Linux user, then following the installation guide for that plugin is all I will offer here. I hope you get up and running without any issues on Windows and Mac.

As is still typical with Linux distributions, there were a few bumps to set things up on my Ubuntu 19.10. The plugin wouldn’t load initially… but after an hour I had everything figured out. Let’s dive into how to get the plugin running in GIMP and export individual layers from our files!

Prerequisites

A bit of background I learnt on GIMP plugins. They can be written with different scripting extensions. The one above is written with GIMP-Python. To be able to run these types of plugins you need:

  1. python
  2. GIMP with pyGimp “module”

I installed both through apt .

$> sudo apt install python
...
$> sudo apt install gimp gimp-python
...

That installs GIMP 2.10.8 with support for python plugins. Make sure you install the gimp-python package there and not just GIMP.

To double check your version of GIMP has GIMP-Python module, look for the “Filters -> Python-Fu -> Console” menu. If you see it, then you are all set to install the plugin.

Image for post
Image for post

The Plugin Itself

The installation guide for the plugin should work from here onward. In short:

  1. Figure out the plugin directory for GIMP:
    a) Open “Edit -> Preferences” menu.
    b) Expand the “Folders” list item in the left panel.
    c) Click on the “Plug-ins” item.
    d) Take note of the plugin directories. Any of them will work.
  2. Download the latest release of the plugin from here and extract the contents.
  3. Copy the contents into your plugin directory (from step 1).
Image for post
Image for post

At this point you should be good to go.

Usage

The plugin adds a new menu item: “File -> Export Layers…”.

Image for post
Image for post
  1. Click “File -> Export Layers…”
  2. Select the export format, i.e. png, and optionally directory to export to.
  3. Press Export.

Now you should see many individual .PNG files in the folder that you chose.

Written by

Software Engineer | Indie Game Developer | Founder of No Such Studio. Follow me to learn how to make video games with Unity. http://www.nosuchstudio.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store