Converting XCF and other files using command line with GIMP?

Ivan Vučica picture Ivan Vučica · Mar 10, 2009 · Viewed 11.9k times · Source

If I have an XCF file (or any other supported by Gimp) how can I convert it to, for example, PNG for display or further processing?

Answer

mgiuca picture mgiuca · Jun 12, 2011

I'm a couple of years late, but I thought I'd add what I think is by far the best solution: there is a tool suite called Xcftools (on Ubuntu, apt-get install xcftools), which has a utility called xcf2png that does this job perfectly.

xcf2png image.xcf -o image.png

This is much better than a) using ImageMagick (which as I said in a comment above is horribly broken), or b) using Gimp (which has an extremely complicated scripting language for simply exporting an image).