Lossless JPEG aka ljpeg is an uncommon JPEG compression method that is lossless. It is used by Canon CR2, Kodak DCR and Adobe DNG
It is currently implemented in libopenraw in ljpegdecompressor.cpp
- ljpeg seems to be the only C reference implementation, and, according to the JPEG-FAQ, has bugs with 16-bits. This is the code that was used as a based for libopenraw implementation.
- Adobe DNG SDK seems to use an adaptation of the former, in C++. Too bad the license isn’t GPL compatible.
- jrawio in Java has an implementation that seems to work.
- dcraw, RawSpeed and libraw also implements it.