Software?
Free, portable C code for JPEG compression is available from the Independent JPEG Group. Source code, documentation, and test files are included. Version 6a is available from ftp.uu.net:/graphics/jpeg/jpegsrc.v6a.tar.gz. If you are on a PC you may prefer ZIP archive format, which you can find at ftp.simtel.net:/pub/simtelnet/msdos/graphics/jpegsr6a.zip A different free JPEG implementation, written by the PVRG group at Stanford, is available from havefun.stanford.edu:/pub/jpeg/JPEGv1.2.1.tar.Z. The PVRG code is designed for research and experimentation rather than production use; it is slower, harder to use, and less portable than the IJG code, but the PVRG code is easier to understand. Also, the PVRG code supports lossless JPEG, while the IJG code does not. (But PVRG does not support progressive JPEG.) [1]

There's also a lossless-JPEG-only implementation available from Cornell, ftp.cs.cornell.edu:/pub/multimed/ljpg.tar.Z [1]