I'm looking for a command line program that will perform resizing, etc. on an image.
The only program I know of which does that is Image Magick. It does pretty much anything. The only drawback is that it's incredibly buggy, with the bugs changing with just about every minor version. This makes it very difficult to write software (e.g. scripts) which use IM as the underlieing image processor. See my http://volker.orcon.net.nz/soft/makeimage script for creating and handling archives of images, as well as processing previously archived images for inclusion in documents. It would do exactly what you're looking for. Read the script itself for some mimmicky which you have to expect with different versions of IM... in case you don't have one which works with makeimage, there's one which will in the same place, and you can install it anywhere where it doesn't interfere with the one you might already have. Please let me know any comments you'd like to make...
If you just add a ! after the geometry specification it will, thusly: for image in *.jpg; do
convert $image -geometry 160x120! thumb-$image
This would be a bad thing to do as the appended ! changes the aspect ratio of the image, which is hardly ever something you'd want. If you need an image of a certain size, crop it properly, don't just make it look crappy by jamming the aspect ratio into something. The above makeimage shows how to generate thumbnail-indices of a pile of given images even if they have any size you like. Volker