Resize with imagemagick

convert pic.jpg -resize 50% pic.png

or

for file in *.png; do convert $file -resize 15% thumbs/$file; done

or

convert ../task1.png -resize 300x100 task1.png

File conversion is also nice:

for foo in *.jpg ; do convert ${foo} ${foo%.jpg}.png ; done