for i in *.jpg; do temp=`echo $i | sed s/jpg/png/`; convert $i $temp; done
for i in *.jpg; do temp=`echo $i | sed s/jpg/gif/`; convert $i $temp; done
Another thing you may notice is that even when using tools that are designed to deliberately compress image files depending on the algorithm there's only so far that you can take it.
At a certain point it just comes down to the raw dimensions of the file itself. This is particularly the case with files that use lossless compression algorithms.
for i in *.jpg; do temp=`echo $i | sed s/jpg/png/`; convert -resize 25% $i $temp; done
The following are useful utilities for dealing with PDF files. I recently needed them to append multiple PDF's to one another/convert to other formats and didn't want to use a full blown editor.