You are here

Export Layers as PNG

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Rate this item!

File->Export Layers->as PNG

Prompts for a folder to save PNG files. Pretty straightforward. *Requires* python!

Should work with 2.4.x through 2.8.x. Will NOT work with some 2.7.x versions and the 2.8 RC1! 2.7 users should move on to current git and 2.8 RC users should upgrade to current 2.8.

- toggle to flatten (remove transparency).
- toggle to save only visible layers
- now saves as filename + layername and special characters are removed
- toggle to remove layer offsets
- toggle to zealous crop each PNG before saving
- handle layer groups (introduced in GIMP 2.8)

NOTE: the registry added a .txt extension - you need to rename to file to just '' and make executable if you're on linux.

AttachmentSize KB
GIMP Version: 
Code License: 


Hi Photocomix!

After a while I found the way to save the layers in tiff.YEEEAAA!

In procedural browser I saw the option "file_tiff_save" and the parameters but I didn't understood how to used it.
I tried to replace the begining of the line"pdb.file_png_save" by "pdb.file_tiff_save" but it didn't work so I give up.

I shake my brain on it and now I've got the solution.
replace the line :
"pdb.file_png_save(tmp, tmp.layers[0], fullpath, name, 0, 9, 1, 1, 1, 1, 1)"
"pdb.file_tiff_save(tmp, tmp.layer[0], fullpath, name, 0)"
and the layers are save in tiff format!

Tiff have no compression( parameter 0 at the end of the line) It is also a lossless format with embedded ICC profil for CMYK print.

I got Python installed and working with GIMP. I have the plug-in in the right folder. So now what? I opened an image as layers. How do I save a single layer?

It's designed to export all layers as PNG files to the specified directory. Have you tried running the plugin yet?

I opened my image as layers. I clicked on python-fu which brings up python console. I found the plug-in selected it and clicked apply. That put the plug-in into the console. Now what? It looks that I should click on save but what am I saving? I tried saving the image but I don't get any kind of prompt.

Thank you for your time and patience.

It should show up as File->Export Layers->as PNG.

For anybody not finding the plugin to use it, it shows up at the bottom of the file menu. you may have to restart gimp for it to show.

This is what is in the console window

GIMP 2.6.8 Python Console
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
>>> pdb.python_fu_export_layers(img, drw, path, flatten)

From the main menu of GIMP: File ->Export Layers ->as PNG.

Do not mess with the Python-Fu console just yet. That's for scripting on the fly - probably not what you are looking for.

I found the plug-in finally. So I opened my image as layers. Click on file - export as layers as png. All it did was same the image as save the whole image as background.png. Apparently there is only 1 layer to the image. I am totally confused. What I need to do is separate the layers/channels so I can put them into Sims 3 "Create a Pattern Tool so they will be recolorable in the game.

All this plug-in does is save each individual layer of an image as an PNG file. It only makes sense to use the plug-in on an image with two or more layers (I wrote it with having quite a lot of layers in mind, as a time saver).

I have no idea what you need to do to get your image(s) into the game. Maybe there's a Sims forum somewhere where you can ask?


Subscribe to Comments for "Export Layers as PNG"