The ImageOptim/ImageAlpha OS X apps are fantastic for compressing all kinds of images for the web.
While a command line tool is useful by itself, using lossy compression is best done in a GUI to determine how much compression draws the right balance between file size and its loss in quality. ImageAlpha is amazing for this.