There's a very useful image processing utility called convert - it will convert images from one format to another, resize them and all sorts of other transformations.

To install ImageMagick, follow the steps below:

First, ensure that the package cache is up to date:

sudo apt-get update

Now install ImageMagick:

sudo apt-get install imagemagick

For more information on convert, go to ImageMagick.