The sips (scriptable image processing system) command can do all this and more. Using Apple's Core Grahpics, sips manipulates images and displays information about them. It doesn't do much - you can't change an image from one format to another, but you ca