ImageMagick is a handy, powerful command-line tool that can crop, scale, rotate, change format, apply basic (and some not-so-basic) effects to pretty much all sorts of images.
How can I join audio tracks, adjust levels, and transcode formats from the command line?