Trimage is a cross-platform GUI and command-line interface to optimize image files via optipng, advpng and jpegoptim, depending on the filetype (currently, PNG and PG files are supported). It was inspired by imageoptim. All image files are losslessy compressed on the highest available compression levels. Trimage gives you various input functions to fit your own workflow: A regular file dialog, dragging and dropping and various command line options.
Install Trimage in ubuntu 10.04/9.10
Open the terminal and run the following commands
sudo add-apt-repository ppa:kilian/trimage
sudo apt-get update
sudo apt-get install trimage