I’ve been using the ImageMagick package for several years to resize and rotate images that I link to on my blog. Both operations are super easy to do with the convert utilities “-resize” and “-rotate” options. The following command will shrink an image by 50%:
$ convert -resize 50% cat.jpg cat.jpg1
To rotate an image 90 degrees you can use “-rotate”:
$ convert -rotate 90 cat.jpg cat.jpg1
Man convert(1) provides a TON more detail along with descriptions of numerous other conversion options.