here is a good tutorial for using jpeglib to do decode and encode. It states the usage of some common parameter of decode and encode.
Category: C++
ijg jpeg rare tutorial
http://www.jpegcameras.com/libjpeg/libjpeg.html
this one is really good example 🙂
http://andrewewhite.net/wordpress/2008/09/02/very-simple-jpeg-writer-in-c-c
this one also 🙂
http://www.cppblog.com/socketref/archive/2006/03/02/3623.aspx