Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

I have a folder with a lot of xcf files which I want all to be converted to png files, at best via a one-liner from bash.

How can I achieve such a task?

share|improve this question
With xcf2png... – jasonwryan Apr 14 '13 at 23:54
@jasonwryan Thanks, worked like a charm. – k0pernikus Apr 15 '13 at 0:01
You may want to give a try to convert tool from ImageMagick. Supports a lot of formats and operations, might be useful in future. – TNW Apr 15 '13 at 0:48
up vote 5 down vote accepted

for i in *; do xcf2png -f $i -o $i.png; done

share|improve this answer

You can use GIMP Image editor and use Export to tool. Use Ctrl-Shift-E as shortcut.
Or you could use convert from imagemagick:

convert filename.xcf filename.png

You could also use xcftools (sudo apt-get install xcftools), which has a utility called xcf2png that does this job perfectly.

xcf2png image.xcf -o image.png
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.