Gimp: Export every layer as a separate PNG image

If PNG is an acceptable output format, one option is to export it as Open Raster (.ora), an open specification for layered-image files.

  1. Export Image as Open Raster (.ora)

    File -> Export As ...

    myfile.ora

  2. Open myfile.ora as an archive, with a program like file-roller or 7zip.

    On Ubuntu:

    $ file-roller myfile.ora
    
    $ # note, later version of file-roller on ubuntu hard-code file suffixes, 
      # and refuse to open ".ora" files, work around by renaming the file to ".zip"
    $ ln -s myfile.ora myfile.ora.zip
    $ file-roller myfile.ora.zip
    

    alternatively

    $ unzip myfile.ora
    

    All your layers will be png images under /data, Extract them and use at will.


You may try also this plugin, Export Layers. I've tested it with png format and it worked. You just select the folder and the format and you get all the layers there, each one in its own file.


One could export the image as an animated GIF. This will save each layer as a separate frame in the GIF.

Then, the ImageMagick command convert -coalesce ./myfile.gif outfile%05d.png will extract the frames as PNG images.