HomeContact
Computerz
ImageMagick for batch processing images
René Dohmen
June 14, 2011
1 min

Imagemagick is the ideal tool to scale, convert or crop a lot of images. The last version of Imagemagick support construction with * to work with a lot of images. But if your images are scattered over a lot of folders and subfolder you need another construction:

The next command will convert al jpg to new jpg with 75% quality, the maxdepth options specifies how much subfolders it will do:

To compress and resize inplace:

NOTE! Mogrify is a dangerous command because it operates on the original files! Test your commands on COPIES of your files.

To change file types:

The above statement will leave the original JPG files alone, and write PNGs beside them.

Same from png -> jpg with scaling 50% applied:

The above statement will leave the original PNG files alone, and write JPGs beside them.

::: {.container}

*

:::


Related Posts

Working with git submodules
October 15, 2023
3 min
© 2024, All Rights Reserved.
Powered by formatics

Quick Links

Advertise with usAbout UsContact Us

Social Media