First, install ImageMagick.
# apt-get install imagemagick
You need to pass -thumbnail argument to convert command:
convert thumbnail <width>x<height> image.png thumbnail.png
So to create a thumbnail of the abc.png image with 200px width, you need to type:
$ convert -thumbnail 200 abc.png thumb.abc.png
To create a thumbnail of the abc.png image with 200px height, you need to type:
$ convert -thumbnail x200 abc.png thumb.abc.png
To create a thumbnails from several images in a folder.
ls *.png | xargs -I {} convert -thumbnail 200 {} thumb.{}
You can replace the image file extension with the one you need.