ECII
ECII

Reputation: 10619

How to batch convert from one image format to another

I would like use imagemagick to convert all TIFF files in a directory to PNG. Is it possible to do it through the convert command without a bash or cmd script?

Upvotes: 0

Views: 851

Answers (2)

Mark Setchell
Mark Setchell

Reputation: 207355

If you have lots of PNG files to convert, and are using a modern, multi-core CPU, you may find you get much better performance using GNU Parallel, like this:

parallel convert {} {.}.tiff ::: *.png

which will convert all PNG files into TIF files using all your available CPU cores.

I benchmarked 1,000 PNG files, each 1000x1000 pixels and it took 4 minutes with mogrify and just 52 seconds using the command above.

GNU Parallel Documentation

Upvotes: 2

ECII
ECII

Reputation: 10619

mogrify -format tiff *.png

thanks to http://www.ofzenandcomputing.com/batch-convert-image-formats-imagemagick/

Upvotes: 1

Related Questions