f743002678eb67b99bbc29fee116b65d9530fec0wroweCopyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
80833bb9a1bf25dcf19e814438a4b311d2e1f4cffuankg
92108a6c4fd7ca6e9acc94d2485920436763e491sfREADME content (required to be distributed if any of the JPEG source code is distributed)
deec48c67d4786bc77112ffbf3a4e70b931097edminfrin--------------------------------------------------------------------------------
deec48c67d4786bc77112ffbf3a4e70b931097edminfrin
deec48c67d4786bc77112ffbf3a4e70b931097edminfrin
deec48c67d4786bc77112ffbf3a4e70b931097edminfrinThe Independent JPEG Group's JPEG software
6d601599d3d65df0410eae6e573e75b2dbfb1fb4minfrin==========================================
6d601599d3d65df0410eae6e573e75b2dbfb1fb4minfrin
6d601599d3d65df0410eae6e573e75b2dbfb1fb4minfrinREADME for release 6b of 27-Mar-1998
6d601599d3d65df0410eae6e573e75b2dbfb1fb4minfrin====================================
40d570cf1420f497bcac59045d4ce477f0b5d891minfrin
40d570cf1420f497bcac59045d4ce477f0b5d891minfrinThis distribution contains the sixth public release of the Independent JPEG
40d570cf1420f497bcac59045d4ce477f0b5d891minfrinGroup's free JPEG software. You are welcome to redistribute this software and
edab53cc0be707fa71968a95c696b19f0e6c4736minfrinto use it for any purpose, subject to the conditions under LEGAL ISSUES, below.
edab53cc0be707fa71968a95c696b19f0e6c4736minfrin
edab53cc0be707fa71968a95c696b19f0e6c4736minfrinSerious users of this software (particularly those incorporating it into
806e9ba570ef48df4bfd8364e2f4d57381388a11minfrinlarger programs) should contact IJG at jpeg-info@uunet.uu.net to be added to
806e9ba570ef48df4bfd8364e2f4d57381388a11minfrinour electronic mailing list. Mailing list members are notified of updates
806e9ba570ef48df4bfd8364e2f4d57381388a11minfrinand have a chance to participate in technical discussions, etc.
806e9ba570ef48df4bfd8364e2f4d57381388a11minfrin
806e9ba570ef48df4bfd8364e2f4d57381388a11minfrinThis software is the work of Tom Lane, Philip Gladstone, Jim Boucher,
0754dde4b645ccd88fdb6c2961c0bdd7b213bdbaminfrinLee Crocker, Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi,
0754dde4b645ccd88fdb6c2961c0bdd7b213bdbaminfrinGuido Vollbeding, Ge' Weijers, and other members of the Independent JPEG
0754dde4b645ccd88fdb6c2961c0bdd7b213bdbaminfrinGroup.
a4273e3e513ce8f5e1311c320cbd334cc382950eminfrin
a4273e3e513ce8f5e1311c320cbd334cc382950eminfrinIJG is not affiliated with the official ISO JPEG standards committee.
a4273e3e513ce8f5e1311c320cbd334cc382950eminfrin
d3e0a61e1bcc497f2efd7af41a5a9d77090ecc1cminfrin
a4273e3e513ce8f5e1311c320cbd334cc382950eminfrinDOCUMENTATION ROADMAP
d3e0a61e1bcc497f2efd7af41a5a9d77090ecc1cminfrin=====================
d3e0a61e1bcc497f2efd7af41a5a9d77090ecc1cminfrin
1aac1c71105133d669960501bdf2274e63561054minfrinThis file contains the following sections:
1aac1c71105133d669960501bdf2274e63561054minfrin
1aac1c71105133d669960501bdf2274e63561054minfrinOVERVIEW General description of JPEG and the IJG software.
2c487ac43b583db869e743772a7a10b278aa2bcfminfrinLEGAL ISSUES Copyright, lack of warranty, terms of distribution.
2c487ac43b583db869e743772a7a10b278aa2bcfminfrinREFERENCES Where to learn more about JPEG.
2c487ac43b583db869e743772a7a10b278aa2bcfminfrinARCHIVE LOCATIONS Where to find newer versions of this software.
2c487ac43b583db869e743772a7a10b278aa2bcfminfrinRELATED SOFTWARE Other stuff you should get.
2c487ac43b583db869e743772a7a10b278aa2bcfminfrinFILE FORMAT WARS Software *not* to get.
dbf5f584c62fe6030d81121fdddeb7588b78b867sfTO DO Plans for future IJG releases.
dbf5f584c62fe6030d81121fdddeb7588b78b867sf
15320dc646e41d3eb38736978500349c4d66dc0dsfOther documentation files in the distribution are:
15320dc646e41d3eb38736978500349c4d66dc0dsf
691db92094897494d6c31326108da20088bc175etrawickUser documentation:
691db92094897494d6c31326108da20088bc175etrawick install.doc How to configure and install the IJG software.
691db92094897494d6c31326108da20088bc175etrawick usage.doc Usage instructions for cjpeg, djpeg, jpegtran,
92108a6c4fd7ca6e9acc94d2485920436763e491sf rdjpgcom, and wrjpgcom.
92108a6c4fd7ca6e9acc94d2485920436763e491sf *.1 Unix-style man pages for programs (same info as usage.doc).
684e0cfc200f66287a93bbd1708d1dd8a92a7eefcovener wizard.doc Advanced usage instructions for JPEG wizards only.
684e0cfc200f66287a93bbd1708d1dd8a92a7eefcovener change.log Version-to-version change highlights.
684e0cfc200f66287a93bbd1708d1dd8a92a7eefcovenerProgrammer and internal documentation:
5c43d2fb853f84497b5ece2d414ef9484aa87e5fsf libjpeg.doc How to use the JPEG library in your own programs.
05a5a9c3e16f21566e1b61f4bd68025ce1b741ccjoes example.c Sample code for calling the JPEG library.
05a5a9c3e16f21566e1b61f4bd68025ce1b741ccjoes structure.doc Overview of the JPEG library's internal structure.
ef82e8fa164e0a1f8b813f7deb6b7ead96018c94niq filelist.doc Road map of IJG files.
26c5829347f6a355c00f1ba0301d575056b69536niq coderules.doc Coding style rules --- please read if you contribute code.
ef82e8fa164e0a1f8b813f7deb6b7ead96018c94niq
ef82e8fa164e0a1f8b813f7deb6b7ead96018c94niqPlease read at least the files install.doc and usage.doc. Useful information
ef82e8fa164e0a1f8b813f7deb6b7ead96018c94niqcan also be found in the JPEG FAQ (Frequently Asked Questions) article. See
ef82e8fa164e0a1f8b813f7deb6b7ead96018c94niqARCHIVE LOCATIONS below to find out where to obtain the FAQ article.
ef82e8fa164e0a1f8b813f7deb6b7ead96018c94niq
ef82e8fa164e0a1f8b813f7deb6b7ead96018c94niqIf you want to understand how the JPEG code works, we suggest reading one or
413ee814748f37be168ff12407fa6dba0ceeabe6trawickmore of the REFERENCES, then looking at the documentation files (in roughly
c12917da693bae4028a1d5a5e8224bceed8c739dsfthe order listed) before diving into the code.
c12917da693bae4028a1d5a5e8224bceed8c739dsf
eeb7898b9c087040d44550f8a6b1a257783c9f0ahumbedooh
eeb7898b9c087040d44550f8a6b1a257783c9f0ahumbedoohOVERVIEW
7705103518c61f7cdcd4041fe871cb45114f31a5rpluem========
eafcc0ebf263d0ba69855b6e10958c4c1a2361bdsf
eafcc0ebf263d0ba69855b6e10958c4c1a2361bdsfThis package contains C software to implement JPEG image compression and
eafcc0ebf263d0ba69855b6e10958c4c1a2361bdsfdecompression. JPEG (pronounced "jay-peg") is a standardized compression
eafcc0ebf263d0ba69855b6e10958c4c1a2361bdsfmethod for full-color and gray-scale images. JPEG is intended for compressing
eafcc0ebf263d0ba69855b6e10958c4c1a2361bdsf"real-world" scenes; line drawings, cartoons and other non-realistic images
d7ffd2da16d58b1a0de212e4d56f7aebb72bef26sfare not its strong suit. JPEG is lossy, meaning that the output image is not
d7ffd2da16d58b1a0de212e4d56f7aebb72bef26sfexactly identical to the input image. Hence you must not use JPEG if you
d7ffd2da16d58b1a0de212e4d56f7aebb72bef26sfhave to have identical output bits. However, on typical photographic images,
4576c1a9ef54cd1e5555ee07d016a7f559f80338sfvery good compression levels can be obtained with no visible change, and
4576c1a9ef54cd1e5555ee07d016a7f559f80338sfremarkably high compression levels are possible if you can tolerate a
4576c1a9ef54cd1e5555ee07d016a7f559f80338sflow-quality image. For more details, see the references, or just experiment
9811aed12bbc71783d2e544ccb5fecd193843eadsfwith various compression settings.
9811aed12bbc71783d2e544ccb5fecd193843eadsf
9811aed12bbc71783d2e544ccb5fecd193843eadsfThis software implements JPEG baseline, extended-sequential, and progressive
d58a822aff1dfda25384d3d009f88f1883c95436kbrandcompression processes. Provision is made for supporting all variants of these
d58a822aff1dfda25384d3d009f88f1883c95436kbrandprocesses, although some uncommon parameter settings aren't implemented yet.
d58a822aff1dfda25384d3d009f88f1883c95436kbrandFor legal reasons, we are not distributing code for the arithmetic-coding
e02ff627c1e63137247e20493f6ef44b3bb1a095sfvariants of JPEG; see LEGAL ISSUES. We have made no provision for supporting
e02ff627c1e63137247e20493f6ef44b3bb1a095sfthe hierarchical or lossless processes defined in the standard.
e02ff627c1e63137247e20493f6ef44b3bb1a095sf
1366443dc565c33e7b449ae428bbfc4c86f33935drhWe provide a set of library routines for reading and writing JPEG image files,
1366443dc565c33e7b449ae428bbfc4c86f33935drhplus two sample applications "cjpeg" and "djpeg", which use the library to
88fac54d9d64f85bbdab5d7010816f4377f95bd7rjungperform conversion between JPEG and some other popular image file formats.
88fac54d9d64f85bbdab5d7010816f4377f95bd7rjungThe library is intended to be reused in other applications.
bd3f5647b96d378d9c75c954e3f13582af32c643sf
bd3f5647b96d378d9c75c954e3f13582af32c643sfIn order to support file conversion and viewing software, we have included
bd3f5647b96d378d9c75c954e3f13582af32c643sfconsiderable functionality beyond the bare JPEG coding/decoding capability;
bd3f5647b96d378d9c75c954e3f13582af32c643sffor example, the color quantization modules are not strictly part of JPEG
bd3f5647b96d378d9c75c954e3f13582af32c643sfdecoding, but they are essential for output to colormapped file formats or
2a7beea91d46beb41f043a84eaad060047ee04aafabiencolormapped displays. These extra functions can be compiled out of the
2a7beea91d46beb41f043a84eaad060047ee04aafabienlibrary if not required for a particular application. We have also included
2a7beea91d46beb41f043a84eaad060047ee04aafabien"jpegtran", a utility for lossless transcoding between different JPEG
2a7beea91d46beb41f043a84eaad060047ee04aafabienprocesses, and "rdjpgcom" and "wrjpgcom", two simple applications for
584a85dd4047e38d3ed3a29b6662fcc9d100ae4csfinserting and extracting textual comments in JFIF files.
584a85dd4047e38d3ed3a29b6662fcc9d100ae4csf
584a85dd4047e38d3ed3a29b6662fcc9d100ae4csfThe emphasis in designing this software has been on achieving portability and
f21e9e3d0bfb7a507ecc5bc963f2159d693503d1sfflexibility, while also making it fast enough to be useful. In particular,
f21e9e3d0bfb7a507ecc5bc963f2159d693503d1sfthe software is not intended to be read as a tutorial on JPEG. (See the
f21e9e3d0bfb7a507ecc5bc963f2159d693503d1sfREFERENCES section for introductory material.) Rather, it is intended to
f6b9c755a0b793e8a3a3aebd327ca20a86478117sfbe reliable, portable, industrial-strength code. We do not claim to have
f6b9c755a0b793e8a3a3aebd327ca20a86478117sfachieved that goal in every aspect of the software, but we strive for it.
f6b9c755a0b793e8a3a3aebd327ca20a86478117sf
132ee6ac1c26d6e8953836316ba50734eefab47bsfWe welcome the use of this software as a component of commercial products.
132ee6ac1c26d6e8953836316ba50734eefab47bsfNo royalty is required, but we do ask for an acknowledgement in product
132ee6ac1c26d6e8953836316ba50734eefab47bsfdocumentation, as described under LEGAL ISSUES.
fc1459657a1fde206a847f9028930725d715f8b4trawick
fc1459657a1fde206a847f9028930725d715f8b4trawick
fc1459657a1fde206a847f9028930725d715f8b4trawickLEGAL ISSUES
85eacfc96a04547ef25aabbc06440039715084c2jorton============
85eacfc96a04547ef25aabbc06440039715084c2jorton
85eacfc96a04547ef25aabbc06440039715084c2jortonIn plain English:
68ba377fc3b124baa759662077c48077ebadb186minfrin
68ba377fc3b124baa759662077c48077ebadb186minfrin1. We don't promise that this software works. (But if you find any bugs,
68ba377fc3b124baa759662077c48077ebadb186minfrin please let us know!)
68ba377fc3b124baa759662077c48077ebadb186minfrin2. You can use this software for whatever you want. You don't have to pay us.
d776b0a2d2889ce1d13494873368f34327a2e1bbtrawick3. You may not pretend that you wrote this software. If you use it in a
d776b0a2d2889ce1d13494873368f34327a2e1bbtrawick program, you must acknowledge somewhere in your documentation that
f4ca9f6f002fece336168a16355434ca966f96a9trawick you've used the IJG code.
78f94f1d06c4e6828ce04d618221e0fcecb57849humbedooh
78f94f1d06c4e6828ce04d618221e0fcecb57849humbedoohIn legalese:
78f94f1d06c4e6828ce04d618221e0fcecb57849humbedooh
536d2e7cd1fdec1255b8c3bdf41fdc714c506a54trawickThe authors make NO WARRANTY or representation, either express or implied,
536d2e7cd1fdec1255b8c3bdf41fdc714c506a54trawickwith respect to this software, its quality, accuracy, merchantability, or
536d2e7cd1fdec1255b8c3bdf41fdc714c506a54trawickfitness for a particular purpose. This software is provided "AS IS", and you,
536d2e7cd1fdec1255b8c3bdf41fdc714c506a54trawickits user, assume the entire risk as to its quality and accuracy.
70caa242e6b90e0d6f0fabb56b8c5c2fb51717b3jorton
985a4368b93c3e9171a57897ad9454c8dbf4cdf6jortonThis software is copyright (C) 1991-1998, Thomas G. Lane.
70caa242e6b90e0d6f0fabb56b8c5c2fb51717b3jortonAll Rights Reserved except as specified below.
70caa242e6b90e0d6f0fabb56b8c5c2fb51717b3jorton
109e2a09790de3fb315d36d6232a14ab66c8eb0ahumbedoohPermission is hereby granted to use, copy, modify, and distribute this
109e2a09790de3fb315d36d6232a14ab66c8eb0ahumbedoohsoftware (or portions thereof) for any purpose, without fee, subject to these
109e2a09790de3fb315d36d6232a14ab66c8eb0ahumbedoohconditions:
74e7a30182af5e68f14ccb8d57918b22b982db8bhumbedooh(1) If any part of the source code for this software is distributed, then this
74e7a30182af5e68f14ccb8d57918b22b982db8bhumbedoohREADME file must be included, with this copyright and no-warranty notice
74e7a30182af5e68f14ccb8d57918b22b982db8bhumbedoohunaltered; and any additions, deletions, or changes to the original files
10961a2f60207cb873d889bb28b1f0ef707a4311humbedoohmust be clearly indicated in accompanying documentation.
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh(2) If only executable code is distributed, then the accompanying
10961a2f60207cb873d889bb28b1f0ef707a4311humbedoohdocumentation must state that "this software is based in part on the work of
0448378b899e8df0c060360f17c0af692adf17bchumbedoohthe Independent JPEG Group".
0448378b899e8df0c060360f17c0af692adf17bchumbedooh(3) Permission for use of this software is granted only if the user accepts
0448378b899e8df0c060360f17c0af692adf17bchumbedoohfull responsibility for any undesirable consequences; the authors accept
60a765cccbd3f3b5997b65b0034220c79f78369etrawickNO LIABILITY for damages of any kind.
60a765cccbd3f3b5997b65b0034220c79f78369etrawick
60a765cccbd3f3b5997b65b0034220c79f78369etrawickThese conditions apply to any software derived from or based on the IJG code,
e7ca863b04ee2a7aea7738cadbf51ce5e6c5245dhumbedoohnot just to the unmodified library. If you use our work, you ought to
e7ca863b04ee2a7aea7738cadbf51ce5e6c5245dhumbedoohacknowledge us.
e7ca863b04ee2a7aea7738cadbf51ce5e6c5245dhumbedooh
e7ca863b04ee2a7aea7738cadbf51ce5e6c5245dhumbedoohPermission is NOT granted for the use of any IJG author's name or company name
91654e263480f0fdc2a03d782ff23f8dad07cf79humbedoohin advertising or publicity relating to this software or products derived from
91814c869ca39ce45dfe147307d2a831cac6ecbehumbedoohit. This software may be referred to only as "the Independent JPEG Group's
91654e263480f0fdc2a03d782ff23f8dad07cf79humbedoohsoftware".
79c5787b92ac5f0e1cc82393816c77a006399316trawick
79c5787b92ac5f0e1cc82393816c77a006399316trawickWe specifically permit and encourage the use of this software as the basis of
79c5787b92ac5f0e1cc82393816c77a006399316trawickcommercial products, provided that all warranty or liability claims are
79c5787b92ac5f0e1cc82393816c77a006399316trawickassumed by the product vendor.
c967bf3bc89e8aa60dbd30d9da388e448ddc1cc4trawick
79c5787b92ac5f0e1cc82393816c77a006399316trawick
79c5787b92ac5f0e1cc82393816c77a006399316trawickansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
79c5787b92ac5f0e1cc82393816c77a006399316trawicksole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
79c5787b92ac5f0e1cc82393816c77a006399316trawickansi2knr.c is NOT covered by the above copyright and conditions, but instead
79c5787b92ac5f0e1cc82393816c77a006399316trawickby the usual distribution terms of the Free Software Foundation; principally,
7b395e4e878c28a4784919cfd2e704ddd14a3390jortonthat you must include source code if you redistribute it. (See the file
7b395e4e878c28a4784919cfd2e704ddd14a3390jortonansi2knr.c for full details.) However, since ansi2knr.c is not needed as part
7b395e4e878c28a4784919cfd2e704ddd14a3390jortonof any program generated from the IJG code, this does not limit you more than
7b395e4e878c28a4784919cfd2e704ddd14a3390jortonthe foregoing paragraphs do.
536e48c08d674acac5d44929318f2ad928edc361jorton
536e48c08d674acac5d44929318f2ad928edc361jortonThe Unix configuration script "configure" was produced with GNU Autoconf.
e81785da447b469da66f218b3f0244aab507958djortonIt is copyright by the Free Software Foundation but is freely distributable.
e81785da447b469da66f218b3f0244aab507958djortonThe same holds for its supporting scripts (config.guess, config.sub,
3e4e54d4e3fc0123c63d57aa84ac7ad7a8c73ff8jortonltconfig, ltmain.sh). Another support script, install-sh, is copyright
3e4e54d4e3fc0123c63d57aa84ac7ad7a8c73ff8jortonby M.I.T. but is also freely distributable.
3e4e54d4e3fc0123c63d57aa84ac7ad7a8c73ff8jorton
53e9b27aba029b18be814df40bcf6f0428771d1efuankgIt appears that the arithmetic coding option of the JPEG spec is covered by
53e9b27aba029b18be814df40bcf6f0428771d1efuankgpatents owned by IBM, AT&T, and Mitsubishi. Hence arithmetic coding cannot
53e9b27aba029b18be814df40bcf6f0428771d1efuankglegally be used without obtaining one or more licenses. For this reason,
53e9b27aba029b18be814df40bcf6f0428771d1efuankgsupport for arithmetic coding has been removed from the free JPEG software.
53e9b27aba029b18be814df40bcf6f0428771d1efuankg(Since arithmetic coding provides only a marginal gain over the unpatented
6bb524f1895f30265a1431afc460977d391cb36bsfHuffman mode, it is unlikely that very many implementations will support it.)
6bb524f1895f30265a1431afc460977d391cb36bsfSo far as we are aware, there are no patent restrictions on the remaining
ca61ccd0c306c2c72df153688ba1b49f3eceed80sfcode.
6bb524f1895f30265a1431afc460977d391cb36bsf
e6dd71992459d05a676b98b7963423dc5dc1e24aminfrinThe IJG distribution formerly included code to read and write GIF files.
e6dd71992459d05a676b98b7963423dc5dc1e24aminfrinTo avoid entanglement with the Unisys LZW patent, GIF reading support has
e6dd71992459d05a676b98b7963423dc5dc1e24aminfrinbeen removed altogether, and the GIF writer has been simplified to produce
e6dd71992459d05a676b98b7963423dc5dc1e24aminfrin"uncompressed GIFs". This technique does not use the LZW algorithm; the
23f1535d6a60817d2846bac0aea230ea475d7dccminfrinresulting GIF files are larger than usual, but are readable by all standard
23f1535d6a60817d2846bac0aea230ea475d7dccminfrinGIF decoders.
23f1535d6a60817d2846bac0aea230ea475d7dccminfrin
23f1535d6a60817d2846bac0aea230ea475d7dccminfrinWe are required to state that
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung "The Graphics Interchange Format(c) is the Copyright property of
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung CompuServe Incorporated. GIF(sm) is a Service Mark property of
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung CompuServe Incorporated."
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjungREFERENCES
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung==========
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung
6249dfa569d3b4f1f539665b979a80c6e335d93etrawickWe highly recommend reading one or more of these references before trying to
6249dfa569d3b4f1f539665b979a80c6e335d93etrawickunderstand the innards of the JPEG software.
0827cb14e550f6f65018431c22c2c913631c8f25kbrand
6249dfa569d3b4f1f539665b979a80c6e335d93etrawickThe best short technical introduction to the JPEG compression algorithm is
ae600ca541efc686b34f8b1f21bd3d0741d37674covener Wallace, Gregory K. "The JPEG Still Picture Compression Standard",
6249dfa569d3b4f1f539665b979a80c6e335d93etrawick Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44.
cfa64348224b66dd1c9979b809406c4d15b1c137fielding(Adjacent articles in that issue discuss MPEG motion picture compression,
74499a117b3b2cd9666715a14f90c0e5d1a4ee8ajimapplications of JPEG, and related topics.) If you don't have the CACM issue
cfa64348224b66dd1c9979b809406c4d15b1c137fieldinghandy, a PostScript file containing a revised version of Wallace's article is
74499a117b3b2cd9666715a14f90c0e5d1a4ee8ajimavailable at ftp://ftp.uu.net/graphics/jpeg/wallace.ps.gz. The file (actually
cfa64348224b66dd1c9979b809406c4d15b1c137fieldinga preprint for an article that appeared in IEEE Trans. Consumer Electronics)
74499a117b3b2cd9666715a14f90c0e5d1a4ee8ajimomits the sample images that appeared in CACM, but it includes corrections
cfa64348224b66dd1c9979b809406c4d15b1c137fieldingand some added material. Note: the Wallace article is copyright ACM and IEEE,
74499a117b3b2cd9666715a14f90c0e5d1a4ee8ajimand it may not be used for commercial purposes.
cfa64348224b66dd1c9979b809406c4d15b1c137fielding
A somewhat less technical, more leisurely introduction to JPEG can be found in
"The Data Compression Book" by Mark Nelson and Jean-loup Gailly, published by
M&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1. This book provides
good explanations and example C code for a multitude of compression methods
including JPEG. It is an excellent source if you are comfortable reading C
code but don't know much about data compression in general. The book's JPEG
sample code is far from industrial-strength, but when you are ready to look
at a full implementation, you've got one here...
The best full description of JPEG is the textbook "JPEG Still Image Data
Compression Standard" by William B. Pennebaker and Joan L. Mitchell, published
by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1. Price US$59.95, 638 pp.
The book includes the complete text of the ISO JPEG standards (DIS 10918-1
and draft DIS 10918-2). This is by far the most complete exposition of JPEG
in existence, and we highly recommend it.
The JPEG standard itself is not available electronically; you must order a
paper copy through ISO or ITU. (Unless you feel a need to own a certified
official copy, we recommend buying the Pennebaker and Mitchell book instead;
it's much cheaper and includes a great deal of useful explanatory material.)
In the USA, copies of the standard may be ordered from ANSI Sales at (212)
642-4900, or from Global Engineering Documents at (800) 854-7179. (ANSI
doesn't take credit card orders, but Global does.) It's not cheap: as of
1992, ANSI was charging $95 for Part 1 and $47 for Part 2, plus 7%
shipping/handling. The standard is divided into two parts, Part 1 being the
actual specification, while Part 2 covers compliance testing methods. Part 1
is titled "Digital Compression and Coding of Continuous-tone Still Images,
Part 1: Requirements and guidelines" and has document numbers ISO/IEC IS
10918-1, ITU-T T.81. Part 2 is titled "Digital Compression and Coding of
Continuous-tone Still Images, Part 2: Compliance testing" and has document
numbers ISO/IEC IS 10918-2, ITU-T T.83.
Some extensions to the original JPEG standard are defined in JPEG Part 3,
a newer ISO standard numbered ISO/IEC IS 10918-3 and ITU-T T.84. IJG
currently does not support any Part 3 extensions.
The JPEG standard does not specify all details of an interchangeable file
format. For the omitted details we follow the "JFIF" conventions, revision
1.02. A copy of the JFIF spec is available from:
Literature Department
C-Cube Microsystems, Inc.
1778 McCarthy Blvd.
Milpitas, CA 95035
phone (408) 944-6300, fax (408) 944-6314
A PostScript version of this document is available by FTP at
ftp://ftp.uu.net/graphics/jpeg/jfif.ps.gz. There is also a plain text
version at ftp://ftp.uu.net/graphics/jpeg/jfif.txt.gz, but it is missing
the figures.
The TIFF 6.0 file format specification can be obtained by FTP from
ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz. The JPEG incorporation scheme
found in the TIFF 6.0 spec of 3-June-92 has a number of serious problems.
IJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6).
Instead, we recommend the JPEG design proposed by TIFF Technical Note #2
(Compression tag 7). Copies of this Note can be obtained from ftp.sgi.com or
from ftp://ftp.uu.net/graphics/jpeg/. It is expected that the next revision
of the TIFF spec will replace the 6.0 JPEG design with the Note's design.
Although IJG's own code does not support TIFF/JPEG, the free libtiff library
uses our library to implement TIFF/JPEG per the Note. libtiff is available
from ftp://ftp.sgi.com/graphics/tiff/.
ARCHIVE LOCATIONS
=================
The "official" archive site for this software is ftp.uu.net (Internet
address 192.48.96.9). The most recent released version can always be found
there in directory graphics/jpeg. This particular version will be archived
as ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz. If you don't have
direct Internet access, UUNET's archives are also available via UUCP; contact
help@uunet.uu.net for information on retrieving files that way.
Numerous Internet sites maintain copies of the UUNET files. However, only
ftp.uu.net is guaranteed to have the latest official version.
You can also obtain this software in DOS-compatible "zip" archive format from
the SimTel archives (ftp://ftp.simtel.net/pub/simtelnet/msdos/graphics/), or
on CompuServe in the Graphics Support forum (GO CIS:GRAPHSUP), library 12
"JPEG Tools". Again, these versions may sometimes lag behind the ftp.uu.net
release.
The JPEG FAQ (Frequently Asked Questions) article is a useful source of
general information about JPEG. It is updated constantly and therefore is
not included in this distribution. The FAQ is posted every two weeks to
Usenet newsgroups comp.graphics.misc, news.answers, and other groups.
It is available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/
and other news.answers archive sites, including the official news.answers
archive at rtfm.mit.edu: ftp://rtfm.mit.edu/pub/usenet/news.answers/jpeg-faq/.
If you don't have Web or FTP access, send e-mail to mail-server@rtfm.mit.edu
with body
send usenet/news.answers/jpeg-faq/part1
send usenet/news.answers/jpeg-faq/part2
RELATED SOFTWARE
================
Numerous viewing and image manipulation programs now support JPEG. (Quite a
few of them use this library to do so.) The JPEG FAQ described above lists
some of the more popular free and shareware viewers, and tells where to
obtain them on Internet.
If you are on a Unix machine, we highly recommend Jef Poskanzer's free
PBMPLUS software, which provides many useful operations on PPM-format image
files. In particular, it can convert PPM images to and from a wide range of
other formats, thus making cjpeg/djpeg considerably more useful. The latest
version is distributed by the NetPBM group, and is available from numerous
sites, notably ftp://wuarchive.wustl.edu/graphics/graphics/packages/NetPBM/.
Unfortunately PBMPLUS/NETPBM is not nearly as portable as the IJG software is;
you are likely to have difficulty making it work on any non-Unix machine.
A different free JPEG implementation, written by the PVRG group at Stanford,
is available from ftp://havefun.stanford.edu/pub/jpeg/. This program
is designed for research and experimentation rather than production use;
it is slower, harder to use, and less portable than the IJG code, but it
is easier to read and modify. Also, the PVRG code supports lossless JPEG,
which we do not. (On the other hand, it doesn't do progressive JPEG.)
FILE FORMAT WARS
================
Some JPEG programs produce files that are not compatible with our library.
The root of the problem is that the ISO JPEG committee failed to specify a
concrete file format. Some vendors "filled in the blanks" on their own,
creating proprietary formats that no one else could read. (For example, none
of the early commercial JPEG implementations for the Macintosh were able to
exchange compressed files.)
The file format we have adopted is called JFIF (see REFERENCES). This format
has been agreed to by a number of major commercial JPEG vendors, and it has
become the de facto standard. JFIF is a minimal or "low end" representation.
We recommend the use of TIFF/JPEG (TIFF revision 6.0 as modified by TIFF
Technical Note #2) for "high end" applications that need to record a lot of
additional data about an image. TIFF/JPEG is fairly new and not yet widely
supported, unfortunately.
The upcoming JPEG Part 3 standard defines a file format called SPIFF.
SPIFF is interoperable with JFIF, in the sense that most JFIF decoders should
be able to read the most common variant of SPIFF. SPIFF has some technical
advantages over JFIF, but its major claim to fame is simply that it is an
official standard rather than an informal one. At this point it is unclear
whether SPIFF will supersede JFIF or whether JFIF will remain the de-facto
standard. IJG intends to support SPIFF once the standard is frozen, but we
have not decided whether it should become our default output format or not.
(In any case, our decoder will remain capable of reading JFIF indefinitely.)
Various proprietary file formats incorporating JPEG compression also exist.
We have little or no sympathy for the existence of these formats. Indeed,
one of the original reasons for developing this free software was to help
force convergence on common, open format standards for JPEG files. Don't
use a proprietary file format!
TO DO
=====
The major thrust for v7 will probably be improvement of visual quality.
The current method for scaling the quantization tables is known not to be
very good at low Q values. We also intend to investigate block boundary
smoothing, "poor man's variable quantization", and other means of improving
quality-vs-file-size performance without sacrificing compatibility.
In future versions, we are considering supporting some of the upcoming JPEG
Part 3 extensions --- principally, variable quantization and the SPIFF file
format.
As always, speeding things up is of great interest.
Please send bug reports, offers of help, etc. to jpeg-info@uunet.uu.net.