Tag: ImageMagick

Resize all images in subdirectories

For a project I was working on, I had a folder structure full of images and wanted to compress them to a specific maximum resolution in-place while retaining the aspect ratio using ImageMagick. The crucial point, as so often, were spaces and special characters in the folder names, making it really hard to use bash loops etc. to make this work. With the NULL character trick, luckily this works pretty well. The manual of xargs explains it like this: -0 Change xargs to expect NUL (``\0'') characters as separators, instead of spaces and newlines. This is expected to be used...