convert -resize 50% myfigure.png myfigure.jpg
# first install imagemagick
#check image size
identify -format "%wx%h" image.jpg
# single image
convert image.jpg -resize 600x400> image.jpg
convert -resize 20% source.png dest.jpg
# batch resize by percentage
for i in $( ls *.jpg); do convert -resize 50% $i re_$i; done
# batch resize and change format
for i in $( ls *.jpg); do convert -resize 50% $i $i.gif; done