views:

143

answers:

0

I keep e.g. buttons for my applications in GIMP xcf-files, with different elements of the image in layers. This provides a nice consistent view of the button and it is easy to replace stuff, such as the button background.
From a single xcf I generate a number of "compiled" images, i.e images with different subsets of the layers merged.
Now, I'd like to be able to script the merging of layers from a shell, basically like:

$ ./merge-gimp-layers image.xcf background layer3 layer5 -o button1.png

to export a merge of the "background", "layer3" and "layer5" layers into button1.png.
(Note that the syntax of my example is irrelevant here)

I looked around a bit at script-fu and python-fu scripts, but couldn't see anything that does exactly this, so I figured I ask here before diving into the details myself.