Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

2 Answers 2

up vote 3 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.

You can also use

convert filename.xcf filename.png

You can 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.