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