Batch image resize in linux

yum install imagemagick

# resize all images to half of its original size.
for i in $( ls *.jpg); do convert -resize 50% $i re_$i; done

# resize all images and at the same time convert as gif format
for i in $( ls *.jpg); do convert -resize 50% $i $i.gif; done

Comments