Imagemagick power resizer command

This command is usefull to resize only images greater than x in a folder.It put resized images in a folder called thumbs but you can convert file implace deleting “thumb/” string.

1
for i in `ls *.jpg`; do convert $i -resize 800x800\> thumb/$i ; done

2 thoughts on “Imagemagick power resizer command”

  1. You don’t need the backticks and “ls” in a for-loop

    for i in `ls *.jpg`; do

    can be changed to

    for i in *.jpg; do

    which is not only simpler but also better, safer and less expensive. If you also put double quotes around $i, that is “$i”, the command would be able to handle filenames with spaces in them. In fact, it would handle filenames with any characters in them, even radioactive characters.

Leave a Reply to David A Cancel reply

Your email address will not be published. Required fields are marked *

Antispam Question * Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.