Just noticed a lot of people requesting code for loading of images. Check out http://www.paulsprojects.net and download the Quake3 BSP project (I’m sure a number of the other projects would work as well) which contains the following files:
jpeg.h
jpeg.cpp
jpeglib.h
jpeg.lib
IMAGE.h
Using these should allow you to easily add .jpg loading to your apps.