5620N/ACopyright (c) 2010, 2014, Oracle
and/or its affiliates. All rights reserved.
5620N/AREADME content (required to be distributed if any of the JPEG source code is distributed)
5620N/A--------------------------------------------------------------------------------
5620N/AThe Independent JPEG Group's JPEG software
5620N/A==========================================
5620N/AREADME for release 6b of 27-Mar-1998
5620N/A====================================
5620N/AThis distribution contains the sixth public release of the Independent JPEG
5620N/AGroup's free JPEG software. You are welcome to redistribute this software and
5620N/Ato use it for any purpose, subject to the conditions under LEGAL ISSUES, below.
5620N/ASerious users of this software (particularly those incorporating it into
5620N/Alarger programs) should contact IJG at jpeg-info@uunet.uu.net to be added to
5620N/Aour electronic mailing list. Mailing list members are notified of updates
5620N/Aand have a chance to participate in technical discussions, etc.
5620N/AThis software is the work of Tom Lane, Philip Gladstone, Jim Boucher,
5620N/ALee Crocker, Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi,
5620N/AGuido Vollbeding, Ge' Weijers, and other members of the Independent JPEG
5620N/AIJG is not affiliated with the official ISO JPEG standards committee.
5620N/AThis file contains the following sections:
5620N/AOVERVIEW General description of JPEG and the IJG software.
5620N/ALEGAL ISSUES Copyright, lack of warranty, terms of distribution.
5620N/AREFERENCES Where to learn more about JPEG.
5620N/AARCHIVE LOCATIONS Where to find newer versions of this software.
5620N/ARELATED SOFTWARE Other stuff you should get.
5620N/AFILE FORMAT WARS Software *not* to get.
5620N/ATO DO Plans for future IJG releases.
5620N/AOther documentation files in the distribution are:
5620N/AProgrammer and internal documentation:
5620N/Acan also be found in the JPEG FAQ (Frequently Asked Questions) article. See
5620N/AARCHIVE LOCATIONS below to find out where to obtain the FAQ article.
5620N/AIf you want to understand how the JPEG code works, we suggest reading one or
5620N/Amore of the REFERENCES, then looking at the documentation files (in roughly
5620N/Athe order listed) before diving into the code.
5620N/AThis package contains C software to implement JPEG image compression and
5620N/Adecompression. JPEG (pronounced "jay-peg") is a standardized compression
5620N/Amethod for full-color and gray-scale images. JPEG is intended for compressing
5620N/A"real-world" scenes; line drawings, cartoons and other non-realistic images
5620N/Aare not its strong suit. JPEG is lossy, meaning that the output image is not
5620N/Aexactly identical to the input image. Hence you must not use JPEG if you
5620N/Ahave to have identical output bits. However, on typical photographic images,
5620N/Avery good compression levels can be obtained with no visible change, and
5620N/Aremarkably high compression levels are possible if you can tolerate a
5620N/Alow-quality image. For more details, see the references, or just experiment
5620N/Awith various compression settings.
5620N/AThis software implements JPEG baseline, extended-sequential, and progressive
5620N/Acompression processes. Provision is made for supporting all variants of these
5620N/Aprocesses, although some uncommon parameter settings aren't implemented yet.
5620N/AFor legal reasons, we are not distributing code for the arithmetic-coding
5620N/Avariants of JPEG; see LEGAL ISSUES. We have made no provision for supporting
5620N/Athe hierarchical or lossless processes defined in the standard.
5620N/AWe provide a set of library routines for reading and writing JPEG image files,
5620N/Aplus two sample applications "cjpeg" and "djpeg", which use the library to
5620N/Aperform conversion between JPEG and some other popular image file formats.
5620N/AThe library is intended to be reused in other applications.
5620N/AIn order to support file conversion and viewing software, we have included
5620N/Afor example, the color quantization modules are not strictly part of JPEG
5620N/Adecoding, but they are essential for output to colormapped file formats or
5620N/Acolormapped displays. These extra functions can be compiled out of the
5620N/Alibrary if not required for a particular application. We have also included
5620N/A"jpegtran", a utility for lossless transcoding between different JPEG
5620N/Aprocesses, and "rdjpgcom" and "wrjpgcom", two simple applications for
5620N/Ainserting and extracting textual comments in JFIF files.
5620N/AThe emphasis in designing this software has been on achieving portability and
5620N/Aflexibility, while also making it fast enough to be useful. In particular,
5620N/Athe software is not intended to be read as a tutorial on JPEG. (See the
5620N/AREFERENCES section for introductory material.) Rather, it is intended to
5620N/Abe reliable, portable, industrial-strength code. We do not claim to have
5620N/Aachieved that goal in every aspect of the software, but we strive for it.
5620N/AWe welcome the use of this software as a component of commercial products.
5620N/ANo royalty is required, but we do ask for an acknowledgement in product
5620N/Adocumentation, as described under LEGAL ISSUES.
5620N/A1. We don't promise that this software works. (But if you find any bugs,
5620N/A2. You can use this software for whatever you want. You don't have to pay us.
5620N/A3. You may not pretend that you wrote this software. If you use it in a
5620N/A program, you must acknowledge somewhere in your documentation that
5620N/AThe authors make NO WARRANTY or representation, either express or implied,
5620N/Awith respect to this software, its quality, accuracy, merchantability, or
5620N/Afitness for a particular purpose. This software is provided "AS IS", and you,
5620N/Aits user, assume the entire risk as to its quality and accuracy.
5620N/AThis software is copyright (C) 1991-1998, Thomas G. Lane.
5620N/AAll Rights Reserved except as specified below.
5620N/APermission is hereby granted to use, copy, modify, and distribute this
5620N/Asoftware (or portions thereof) for any purpose, without fee, subject to these
5620N/A(1) If any part of the source code for this software is distributed, then this
5620N/AREADME file must be included, with this copyright and no-warranty notice
5620N/Aunaltered; and any additions, deletions, or changes to the original files
5620N/Amust be clearly indicated in accompanying documentation.
5620N/A(2) If only executable code is distributed, then the accompanying
5620N/Adocumentation must state that "this software is based in part on the work of
5620N/Athe Independent JPEG Group".
5620N/A(3) Permission for use of this software is granted only if the user accepts
5620N/Afull responsibility for any undesirable consequences; the authors accept
5620N/ANO LIABILITY for damages of any kind.
5620N/AThese conditions apply to any software derived from or based on the IJG code,
5620N/Anot just to the unmodified library. If you use our work, you ought to
5620N/APermission is NOT granted for the use of any IJG author's name or company name
5620N/Ain advertising or publicity relating to this software or products derived from
5620N/Ait. This software may be referred to only as "the Independent JPEG Group's
5620N/AWe specifically permit and encourage the use of this software as the basis of
5620N/Acommercial products, provided that all warranty or liability claims are
5620N/Aassumed by the product vendor.
5620N/Aansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
5620N/Asole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
5620N/Aby the usual distribution terms of the Free Software Foundation; principally,
5620N/Athat you must include source code if you redistribute it. (See the file
5620N/Aof any program generated from the IJG code, this does not limit you more than
5620N/Athe foregoing paragraphs do.
5620N/AThe Unix configuration script "configure" was produced with GNU Autoconf.
5620N/AIt is copyright by the Free Software Foundation but is freely distributable.
5620N/AIt appears that the arithmetic coding option of the JPEG spec is covered by
5620N/Apatents owned by IBM, AT&T, and Mitsubishi. Hence arithmetic coding cannot
5620N/Alegally be used without obtaining one or more licenses. For this reason,
5620N/Asupport for arithmetic coding has been removed from the free JPEG software.
5620N/A(Since arithmetic coding provides only a marginal gain over the unpatented
5620N/AHuffman mode, it is unlikely that very many implementations will support it.)
5620N/ASo far as we are aware, there are no patent restrictions on the remaining
5620N/AThe IJG distribution formerly included code to read and write GIF files.
5620N/ATo avoid entanglement with the Unisys LZW patent, GIF reading support has
5620N/Abeen removed altogether, and the GIF writer has been simplified to produce
5620N/A"uncompressed GIFs". This technique does not use the LZW algorithm; the
5620N/Aresulting GIF files are larger than usual, but are readable by all standard
5620N/AWe are required to state that
5620N/A "The Graphics Interchange Format(c) is the Copyright property of
5620N/A CompuServe Incorporated. GIF(sm) is a Service Mark property of
5620N/AWe highly recommend reading one or more of these references before trying to
5620N/Aunderstand the innards of the JPEG software.
5620N/AThe best short technical introduction to the JPEG compression algorithm is
5620N/A Wallace, Gregory K. "The JPEG Still Picture Compression Standard",
5620N/A Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44.
5620N/A(Adjacent articles in that issue discuss MPEG motion picture compression,
5620N/Aapplications of JPEG, and related topics.) If you don't have the CACM issue
5620N/Ahandy, a PostScript file containing a revised version of Wallace's article is
5620N/Aa preprint for an article that appeared in IEEE Trans. Consumer Electronics)
5620N/Aomits the sample images that appeared in CACM, but it includes corrections
5620N/Aand some added material. Note: the Wallace article is copyright ACM and IEEE,
5620N/Aand it may not be used for commercial purposes.
5620N/AA somewhat less technical, more leisurely introduction to JPEG can be found in
5620N/A"The Data Compression Book" by Mark Nelson and Jean-loup Gailly, published by
5620N/AM&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1. This book provides
5620N/Agood explanations and example C code for a multitude of compression methods
5620N/Aincluding JPEG. It is an excellent source if you are comfortable reading C
5620N/Acode but don't know much about data compression in general. The book's JPEG
5620N/Asample code is far from industrial-strength, but when you are ready to look
5620N/Aat a full implementation, you've got one here...
5620N/AThe best full description of JPEG is the textbook "JPEG Still Image Data
5620N/ACompression Standard" by William B. Pennebaker and Joan L. Mitchell, published
5620N/Aby Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1. Price US$59.95, 638 pp.
5620N/AThe book includes the complete text of the ISO JPEG standards (DIS 10918-1
5620N/Aand draft DIS 10918-2). This is by far the most complete exposition of JPEG
5620N/Ain existence, and we highly recommend it.
5620N/AThe JPEG standard itself is not available electronically; you must order a
5620N/Apaper copy through ISO or ITU. (Unless you feel a need to own a certified
5620N/Aofficial copy, we recommend buying the Pennebaker and Mitchell book instead;
5620N/Ait's much cheaper and includes a great deal of useful explanatory material.)
5620N/AIn the USA, copies of the standard may be ordered from ANSI Sales at (212)
5620N/A642-4900, or from Global Engineering Documents at (800) 854-7179. (ANSI
5620N/Adoesn't take credit card orders, but Global does.) It's not cheap: as of
5620N/A1992, ANSI was charging $95 for Part 1 and $47 for Part 2, plus 7%
5620N/Aactual specification, while Part 2 covers compliance testing methods. Part 1
5620N/Ais titled "Digital Compression and Coding of Continuous-tone Still Images,
5620N/APart 1: Requirements and guidelines" and has document numbers
ISO/IEC IS
5620N/A10918-1, ITU-T T.81. Part 2 is titled "Digital Compression and Coding of
5620N/AContinuous-tone Still Images, Part 2: Compliance testing" and has document
5620N/ASome extensions to the original JPEG standard are defined in JPEG Part 3,
5620N/Aa newer ISO standard numbered
ISO/IEC IS 10918-3 and ITU-T T.84. IJG
5620N/Acurrently does not support any Part 3 extensions.
5620N/AThe JPEG standard does not specify all details of an interchangeable file
5620N/Aformat. For the omitted details we follow the "JFIF" conventions, revision
5620N/A1.02. A copy of the JFIF spec is available from:
5620N/A phone (408) 944-6300, fax (408) 944-6314
5620N/AA PostScript version of this document is available by FTP at
5620N/AThe TIFF 6.0 file format specification can be obtained by FTP from
5620N/Afound in the TIFF 6.0 spec of 3-June-92 has a number of serious problems.
5620N/AIJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6).
5620N/AInstead, we recommend the JPEG design proposed by TIFF Technical Note #2
5620N/Aof the TIFF spec will replace the 6.0 JPEG design with the Note's design.
5620N/AAlthough IJG's own code does not support
TIFF/JPEG, the free libtiff library
5620N/Auses our library to implement
TIFF/JPEG per the Note. libtiff is available
5620N/Aaddress 192.48.96.9). The most recent released version can always be found
5620N/Adirect Internet access, UUNET's archives are also available via UUCP; contact
5620N/Ahelp@uunet.uu.net for information on retrieving files that way.
5620N/ANumerous Internet sites maintain copies of the UUNET files. However, only
5620N/AYou can also obtain this software in DOS-compatible "zip" archive format from
5620N/Aon CompuServe in the Graphics Support forum (GO CIS:GRAPHSUP), library 12
5620N/AThe JPEG FAQ (Frequently Asked Questions) article is a useful source of
5620N/Ageneral information about JPEG. It is updated constantly and therefore is
5620N/Anot included in this distribution. The FAQ is posted every two weeks to
5620N/AIf you don't have Web or FTP access, send e-mail to mail-server@rtfm.mit.edu
5620N/ANumerous viewing and image manipulation programs now support JPEG. (Quite a
5620N/Afew of them use this library to do so.) The JPEG FAQ described above lists
5620N/Asome of the more popular free and shareware viewers, and tells where to
5620N/AIf you are on a Unix machine, we highly recommend Jef Poskanzer's free
5620N/APBMPLUS software, which provides many useful operations on PPM-format image
5620N/Afiles. In particular, it can convert PPM images to and from a wide range of
5620N/Aversion is distributed by the NetPBM group, and is available from numerous
5620N/Ayou are likely to have difficulty making it work on any non-Unix machine.
5620N/AA different free JPEG implementation, written by the PVRG group at Stanford,
5620N/Ais designed for research and experimentation rather than production use;
5620N/Ait is slower, harder to use, and less portable than the IJG code, but it
5620N/Ais easier to read and modify. Also, the PVRG code supports lossless JPEG,
5620N/Awhich we do not. (On the other hand, it doesn't do progressive JPEG.)
5620N/ASome JPEG programs produce files that are not compatible with our library.
5620N/AThe root of the problem is that the ISO JPEG committee failed to specify a
5620N/Aconcrete file format. Some vendors "filled in the blanks" on their own,
5620N/Acreating proprietary formats that no one else could read. (For example, none
5620N/Aof the early commercial JPEG implementations for the Macintosh were able to
5620N/AThe file format we have adopted is called JFIF (see REFERENCES). This format
5620N/Ahas been agreed to by a number of major commercial JPEG vendors, and it has
5620N/Abecome the de facto standard. JFIF is a minimal or "low end" representation.
5620N/ATechnical Note #2) for "high end" applications that need to record a lot of
5620N/Aadditional data about an image.
TIFF/JPEG is fairly new and not yet widely
5620N/AThe upcoming JPEG Part 3 standard defines a file format called SPIFF.
5620N/ASPIFF is interoperable with JFIF, in the sense that most JFIF decoders should
5620N/Abe able to read the most common variant of SPIFF. SPIFF has some technical
5620N/Aadvantages over JFIF, but its major claim to fame is simply that it is an
5620N/Aofficial standard rather than an informal one. At this point it is unclear
5620N/Awhether SPIFF will supersede JFIF or whether JFIF will remain the de-facto
5620N/Astandard. IJG intends to support SPIFF once the standard is frozen, but we
5620N/Ahave not decided whether it should become our default output format or not.
5620N/A(In any case, our decoder will remain capable of reading JFIF indefinitely.)
5620N/AVarious proprietary file formats incorporating JPEG compression also exist.
5620N/AWe have little or no sympathy for the existence of these formats. Indeed,
5620N/Aone of the original reasons for developing this free software was to help
5620N/Aforce convergence on common, open format standards for JPEG files. Don't
5620N/Ause a proprietary file format!
5620N/AThe major thrust for v7 will probably be improvement of visual quality.
5620N/AThe current method for scaling the quantization tables is known not to be
5620N/Avery good at low Q values. We also intend to investigate block boundary
5620N/Asmoothing, "poor man's variable quantization", and other means of improving
5620N/Aquality-vs-file-size performance without sacrificing compatibility.
5620N/AIn future versions, we are considering supporting some of the upcoming JPEG
5620N/APart 3 extensions --- principally, variable quantization and the SPIFF file
5620N/AAs always, speeding things up is of great interest.
5620N/APlease send bug reports, offers of help, etc. to jpeg-info@uunet.uu.net.