Clone of http://libjpeg.sourceforge.net