Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Automated batch xcf layer combining and png exporting
#1
Big favor to ask of you scripting/programming gurus. I have three directories full of Gimp XCF layers and need help automating the combining of them, and exporting the resulting images as PNGs.

I'm agnostic to what language(s) are used, as long it'll run on a mac, specs below.

So the idea is to sequentially loop through the three directories, load one respective XCF layer from each, and export the three-layer combination as a PNG in a 4th directory.  The PNG filename could be a concatenation of the three XCF filenames used for each resultant image.

Directory structure looks like this:

ProjectName
  Layer1Files (top layer)
    A0.xcf
    A1.xcf
    A2.xcf
    A3.xcf
    A4.xcf
  Layer2Files (middle layer)
    B0.xcf
    B1.xcf
    B2.xcf
    B3.xcf
    B4.xcf
  Layer3Files (background layer)
    C0.xcf
    C1.xcf
    C2.xcf
    C3.xcf
    C4.xcf
  CombinedPngs (to be created)
    A0B0C0.png
    A0B0C1.png
    ...
    A0B0C4.png
    A0B1C0.png
    A0B1C1.png
    etc.

And so forth until we get from A0B0C0.png all the way to A4B4C4.png.

Mac is running Catalina 10.15.7
Gimp 2.10.24 per the Mac binary download.
Python 2.7.16 per MacOS default. (Though I understand this version is obsolete.)
Bash 3.2 is accessible (though zsh 5.7.1 is the default).
Scheme I've see mentioned but know nothing about.
Same with Fu.
Happy to upgrade and/or install whatever's needed to get this done.

THANK YOU to anyone willing to help with this!
Reply


Messages In This Thread
Automated batch xcf layer combining and png exporting - by gimpler - 09-05-2021, 03:36 AM

Forum Jump: