f743002678eb67b99bbc29fee116b65d9530fec0wroweCopyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
92108a6c4fd7ca6e9acc94d2485920436763e491sfREADME content (required to be distributed if any of the JPEG source code is distributed)
deec48c67d4786bc77112ffbf3a4e70b931097edminfrin--------------------------------------------------------------------------------
deec48c67d4786bc77112ffbf3a4e70b931097edminfrinThe Independent JPEG Group's JPEG software
6d601599d3d65df0410eae6e573e75b2dbfb1fb4minfrin==========================================
6d601599d3d65df0410eae6e573e75b2dbfb1fb4minfrinREADME for release 6b of 27-Mar-1998
6d601599d3d65df0410eae6e573e75b2dbfb1fb4minfrin====================================
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.
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.
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
a4273e3e513ce8f5e1311c320cbd334cc382950eminfrinIJG is not affiliated with the official ISO JPEG standards committee.
a4273e3e513ce8f5e1311c320cbd334cc382950eminfrinDOCUMENTATION ROADMAP
d3e0a61e1bcc497f2efd7af41a5a9d77090ecc1cminfrin=====================
1aac1c71105133d669960501bdf2274e63561054minfrinThis file contains the following sections:
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.
15320dc646e41d3eb38736978500349c4d66dc0dsfOther documentation files in the distribution are:
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.
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.
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.
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.
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.
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.
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.
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.
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.
fc1459657a1fde206a847f9028930725d715f8b4trawickLEGAL ISSUES
85eacfc96a04547ef25aabbc06440039715084c2jorton============
85eacfc96a04547ef25aabbc06440039715084c2jortonIn plain English:
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.
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.
985a4368b93c3e9171a57897ad9454c8dbf4cdf6jortonThis software is copyright (C) 1991-1998, Thomas G. Lane.
70caa242e6b90e0d6f0fabb56b8c5c2fb51717b3jortonAll Rights Reserved except as specified below.
109e2a09790de3fb315d36d6232a14ab66c8eb0ahumbedoohPermission is hereby granted to use, copy, modify, and distribute this
109e2a09790de3fb315d36d6232a14ab66c8eb0ahumbedoohsoftware (or portions thereof) for any purpose, without fee, subject to these
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.
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.
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
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.
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.
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.
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
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.
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."
6249dfa569d3b4f1f539665b979a80c6e335d93etrawickWe highly recommend reading one or more of these references before trying to
6249dfa569d3b4f1f539665b979a80c6e335d93etrawickunderstand the innards of the JPEG software.
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.
shipping/handling. The standard is divided into two parts, Part 1 being the
Part 1: Requirements and guidelines" and has document numbers ISO/IEC IS
numbers ISO/IEC IS 10918-2, ITU-T T.83.
a newer ISO standard numbered ISO/IEC IS 10918-3 and ITU-T T.84. IJG
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
ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz. The JPEG incorporation scheme
(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
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
The "official" archive site for this software is ftp.uu.net (Internet
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
ftp.uu.net is guaranteed to have the latest official version.
the SimTel archives (ftp://ftp.simtel.net/pub/simtelnet/msdos/graphics/), or
"JPEG Tools". Again, these versions may sometimes lag behind the ftp.uu.net
It is available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/
other formats, thus making cjpeg/djpeg considerably more useful. The latest
sites, notably ftp://wuarchive.wustl.edu/graphics/graphics/packages/NetPBM/.
Unfortunately PBMPLUS/NETPBM is not nearly as portable as the IJG software is;
is available from ftp://havefun.stanford.edu/pub/jpeg/. This program
We recommend the use of TIFF/JPEG (TIFF revision 6.0 as modified by TIFF
additional data about an image. TIFF/JPEG is fairly new and not yet widely