Libjpeg
Encyclopedia
libjpeg is a library
Library (computer science)
In computer science, a library is a collection of resources used to develop software. These may include pre-written code and subroutines, classes, values or type specifications....

 written entirely in C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

 which contains a widely-used implementation of a JPEG decoder, JPEG encoder and other JPEG
JPEG
In computing, JPEG . The degree of compression can be adjusted, allowing a selectable tradeoff between storage size and image quality. JPEG typically achieves 10:1 compression with little perceptible loss in image quality....

 utilities. This library is maintained by the Independent JPEG Group.

Utilities

The following utility programs are available with libjpeg:
  • cjpeg and djpeg, for performing conversions between JPEG and some other popular image file formats.
  • rdjpgcom and wrjpgcom, for inserting and extracting textual comments in JFIF files.
  • jpegtran – a utility for lossless transcoding between different JPEG formats.


The jpegtran command-line program is useful to:
  • optimize the Huffman coding
    Huffman coding
    In computer science and information theory, Huffman coding is an entropy encoding algorithm used for lossless data compression. The term refers to the use of a variable-length code table for encoding a source symbol where the variable-length code table has been derived in a particular way based on...

     layer of a JPEG file to increase compression,
  • convert between progressive and non-progressive JPEG formats,
  • eliminate non-standard application-specific data inserted by some image programs, or
  • to perform certain transformations on a file, such as:
    • grayscaling,
    • rotating and flipping
      Flipped image
      A flipped image or reversed image, the more formal term, is a static or moving image that is generated by a mirror-reversal of an original across a horizontal axis...

       (within certain limits), and
    • cropping

...all done "losslessly" (i.e. without decompressing and recompressing the data, and so causing a reduction of image quality due to generation loss
Generation loss
Generation loss refers to the loss of quality between subsequent copies or transcodes of data. Anything that reduces the quality of the representation when copying, and would cause further reduction in quality on making a copy of the copy, can be considered a form of generation loss...

).

There is an associated Windows application, Jpegcrop, which provides a user interface to jpegtran.

libjpeg-turbo

libjpeg-turbo is a fork of libjpeg that uses SIMD
SIMD
Single instruction, multiple data , is a class of parallel computers in Flynn's taxonomy. It describes computers with multiple processing elements that perform the same operation on multiple data simultaneously...

 instructions to accelerate JPEG encoding and decoding.
Fedora 14
Fedora (operating system)
Fedora is a RPM-based, general purpose collection of software, including an operating system based on the Linux kernel, developed by the community-supported Fedora Project and sponsored by Red Hat...

 switched to libjpeg-turbo in 2010. Mozilla
Mozilla
Mozilla is a term used in a number of ways in relation to the Mozilla.org project and the Mozilla Foundation, their defunct commercial predecessor Netscape Communications Corporation, and their related application software....

 switched to libjpeg-turbo in Firefox 5.0.Chrome 11 also has switched to this version.

External links

  • Independent JPEG Group Website
  • Binary package of libjpeg for Microsoft Windows
    Microsoft Windows
    Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

     (at GnuWin32
    GnuWin32
    The GnuWin32 project provides native ports in the form of runnable computer programs, patches, and source code for various GNU and open source tools and software, much of it modified to run on the 32-bit Windows platform...

     in SourceForge
    SourceForge
    SourceForge Enterprise Edition is a collaborative revision control and software development management system. It provides a front-end to a range of software development lifecycle services and integrates with a number of free software / open source software applications .While originally itself...

    )
  • Binary packages of libjpeg for Microsoft Windows
    Microsoft Windows
    Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

     (MingW and Microsoft Visual C++ versions 7 and 8), and for Mac OS X (Universal, GCC 4.0; PowerPC, GCC 4.0; PowerPC, GCC 3.3) (at ClanLib
    ClanLib
    ClanLib is a cross-platform C++ game SDK, currently supporting Microsoft Windows, Linux and Mac OS X. It has full hardware accelerated graphics support through OpenGL, and also a software renderer...

    )
  • libjpeg-turbo, an ABI-/API-compatible extension of libjpeg which uses x86 SIMD instructions to achieve a substantial speedup over the reference implementation.
  • Jpeg Faqs
  • Additional features for libjpeg
  • LibJpeg.NET - .NET version of LibJpeg
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK