5 thoughts on “Batch Resize Image

  1. Thats a good info but I like this better (for obvious reasons that it does not change the filename):
    for i in * do; convert -sample 800×600 $i ak_$i; done

    BTW, do you have any idea, wheather resize is better or sample is better option in covert for resizing the image. I did not see any difference in both approaches other then technical difference.

  2. Yeah – I like that too – as a matter of fact, I have a shell script that does this…

    #!/bin/sh
    # An Easy command to use the convert command. Makes sure that the rename problem don't happen
    
    if [ ! -d "Out" ]; then
            mkdir Out
    fi
    
    sel="*.*"
    if [ $# -eq 2 ] ; then
            sel=$2
    fi
    
    for i in $sel; do
            echo -n "Converting $i ... "
            convert $1 $i Out/$i
            echo "Done"
    done
    

    About the Resample/Resize issue – I am not sure either.

  3. Pingback: Shell Script for Batch Convertion of Images | txt

Leave a Reply

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