I'm running this command to create thumbnails with mogrify and it works great!
#! /bin/bash
mogrify \
-resize 300x300 \
-crop 200x200+0-20 \
-gravity center \
-format jpg \
-quality 100 \
-path thumbs \
*.jpg
But what I would like to add is a suffix to the output filenames like. -avatar So the output image name is changed from testimage.jpg to testimage-avatar.jpg.
Thanks all!
I don't think you can do it with
mogrify, but you can useconvert:and you would have to put it in a loop over all JPEG files:
Alternatively, you could retain your original
mogrifycommand - which is actually more efficient thanconvertand then go into thethumbsdirectory afterwards and userenameto put theavatarbit in:Sample Output