From Free Software Directory
This is the approved revision of this page; it is not the most recent. View the most recent revision.
Jump to: navigation, search


libjpeg is a free library that contains C software to implement JPEG image encoding, decoding, and transcoding.

This package implements a JPEG codec (encoding and decoding) alongside various utilities for handling JPEG data. It is written in C and distributed as free software together with its source code under the terms of a custom permissive (BSD-like) free software license. The original variant is maintained and published by the Independent JPEG Group (IJG).

Provision is made for supporting all variants of these processes, although some uncommon parameter settings aren't implemented yet. There has been no provision for supporting the hierarchical or lossless processes defined in the standard.

A set of library routines is provided for reading and writing JPEG image files, plus two sample applications "cjpeg" and "djpeg", which use the library to perform conversion between JPEG and some other popular image file formats. The library is intended to be reused in other applications.

In order to support file conversion and viewing software, there is considerable functionality beyond the bare JPEG coding/decoding capability; for example, the color quantization modules are not strictly part of JPEG decoding, but they are essential for output to colormapped file formats or colormapped displays. These extra functions can be compiled out of the library if not required for a particular application.

There is also "jpegtran", a utility for lossless transcoding between different JPEG processes, and "rdjpgcom" and "wrjpgcom", two simple applications for inserting and extracting textual comments in JFIF files.




Verified by

Verified on




Verified by

Panos Alevropoulos

Verified on

9 July 2021

Leaders and contributors

Resources and communication

Software prerequisites


"IJG" is not in the list (ACEL, AFL-3.0, AGPL-1.0, AGPL-1.0-or-later, AGPL-3.0, AGPL-3.0-or-later, AGPL-3.0-or-later-with-exception, AGPL-3.0-with-exception, AGPLv1orlater, AGPLv3, ...) of allowed values for the "License" property.

Property "Submitted by" (as page type) with input value "{{{Submitted by}}}" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process. "{{{Submitted date}}}" contains an extrinsic dash or other characters that are invalid for a date interpretation.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the page “GNU Free Documentation License”.

The copyright and license notices on this page only apply to the text on this page. Any software or copyright-licenses or other similar notices described in this text has its own copyright notice and license, which can usually be found in the distribution or license text itself.