in reply to Convert BMP to JPG?

The IJG JPEG library source, which is, BTW , the JPEG library all the mentioned open source image manipulation uses, comes with some command line tools, including cjpeg. The quality is excellent, I can testify for that.

If you look around, you can find binaries for many platforms, for example, here are the 32-bit DOS binaries, and I'm sure Cygwin binary versions are available for download somewhere, too.