Libjpeg
|
libjpeg is a library of computer programs created by the Independent JPEG Group which contain functions to manipulate JPEG images. It is written entirely in the C programming language. The current version of the library is 6b, although it has not been updated since 1998.
A common error that users of the library sometimes stumble upon is "JPEG parameter struct mismatch: library thinks size is X, caller expects Y" where X and Y are some numbers in the range 400-500. The reason for the error is that the user is using a version of the header file, jpeglib.h, that is different from the version of the installed binaries. This occurs when two different versions of libjpeg have been installed.
jpegtran
One of the programs distributed with libjpeg is jpegtran, which does various lossless manipulations of JPEG images. For example, jpegtran can losslessly rotate and flip images. There are versions that can also crop JPEG images "losslessly", meaning that the part of the image that remains doesn't lose any quality.