To publish pictures in my gallery I have to resize them. Doing this picture per picture is annoying, I want to batch resize the images – the best solution would be a command line tool that accepts wildcards (*) so that many files (e.g. all in a specified folder) can be modified at once. With ImageMagick this is a very easy task under Linux: the command mogrify -resize "1200>" */*.JPG
resizes all files with the ending .JPG in all subfolders to a width of 1200 pixels. The resize operation is only done if the original is larger than 1200 pixels (option >
).
It might happen that you want to keep the originals. Then you should take the convert command instead of mogrifiy with all the same options.
Thanks! Personally I always copy the images before doing any editing but it’s always useful to know such things.
That was a great help, thank you!