Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert .xcf files to .png files in batch?

Tags:

gimp

I'm using Windows. I have a folder with .xcf files, each 100x100px. I would like to run a process that will convert them to .png files making them 40x40px. How can I do that?

like image 297
SBel Avatar asked Nov 28 '25 13:11

SBel


1 Answers

You might succeed using ImageMagick which also supports XCF for reading. They also provide Windows binaries. The tool also has various transformation (scaling) options, so you can convert and scale each image with one call:

convert source.xcf -resize 40x40 target.png

I'm not fluent with Windows batch programming and don't have access to Windows PC right now, I think a simple loop would look something like this:

for %%f in (*.xcf) do (
    convert %%f -resize 40x40 %%~nf.png
)
like image 106
DarkDust Avatar answered Dec 01 '25 22:12

DarkDust