Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a simple way to export the current selected layer as a png/jpg file in Gimp 2.8.4 ?

I did some searching in google, and the export should do it in gimp 2.6 if the layer is the only visible layer, but I can't get that to work for gimp 2.8

The way I currently do it now is that I select the content, and cut/paste it to a new image, then export the image and close it, but a simple export selected layer would be much more easy to use.

share|improve this question
What OS are you using? – terdon Mar 27 '13 at 19:39
Linux. (Fedora but how does that matter?) – MTilsted Mar 28 '13 at 4:17
You never know, there are often differences in the same software between OSs. – terdon Mar 28 '13 at 12:24

I can do this on GIMP 2.8.2 running on Linux. The image below has two layers, one blue and one black.

enter image description here

If I export the image as is, I get a blue png. Now, set the blue layer to invisible:

enter image description here

If I now export this image (CtrlE) I get a nice black .png:

enter image description here

share|improve this answer
That works except for 2 things. The result image when exported as png still has the same size as the original image. So try to make your black box smaller and then export it. You will end up with a small black box, with a large transparent area around it. – MTilsted Mar 28 '13 at 4:17

Note that the "Save As" operation ignores layers and visibility in formats where layers are not supported. Merging or flattening the image for export is a separate operation available before Gimp converts the format, and it is not mandatory. You can skip the flattening and merging operation by clicking "Ignore."

When you chose to "Save As" from the file menu, by default only the active layer is exported unless the target format supports layers. For example, if your image has three layers and you want a PNG image, the PNG will only have graphic information for one layer: the active layer, UNLESS you flatten the image or merge layers.

Now to save three layers as three images, you need to make three "save as" operations. The steps below outline the sequence for creating separate images from layers.

  1. Ensure the editor window is active with the top layer selected.
  2. Press "CTRL-SHIFT-S" for the Save As dialogue.
  3. Choose your output format, and file name for the FIRST page. Press "Enter"
  4. On the Export dialogue, choose "Ignore"
  5. Set the options for your destination format and press "Enter" or click "Save."

    You are now returned to the image editor window. Repeat the below steps for each layer.

  6. Press "Page Down" to activate the next layer.
  7. Press "CTRL-SHIFT-S" for the Save As dialogue.
  8. Choose your output format, and file name for the NEXT page. Press "Enter"
  9. On the Export dialogue, choose "Ignore"
  10. The options for your destination format are remembered. Press "Enter" or click "Save."

A Script-fu could easily handle this.
Using layer keyboard shortcuts you can export each layer in very few steps.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .