Home » Personal collection » Acorn hard disk » apps » web » !ChangeFSI/btpc/READMEJ

!ChangeFSI/btpc/READMEJ

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn hard disk » apps » web
Filename: !ChangeFSI/btpc/READMEJ
Read OK:
File size: 4EED bytes
Load address: 0000
Exec address: 0000
Duplicates

There are 3 duplicate copies of this file in the archive:

File contents
BTPC uses the Independent JPEG Group's JPEG software in the file colmap.C only.
IJG require that their README file be distributed with any modified version of
their code. So here it is:

==========================================================================

The Independent JPEG Group's JPEG software
==========================================

README for release 6 of 2-Aug-95
================================

This distribution contains the sixth public release of the Independent JPEG
Group's free JPEG software.  You are welcome to redistribute this software and
to use it for any purpose, subject to the conditions under LEGAL ISSUES, below.

Serious users of this software (particularly those incorporating it into
larger programs) should contact IJG at jpeg-info@uunet.uu.net to be added to
our electronic mailing list.  Mailing list members are notified of updates
and have a chance to participate in technical discussions, etc.

This software is the work of Tom Lane, Philip Gladstone, Luis Ortiz, Jim
Boucher, Lee Crocker, Julian Minguillon, George Phillips, Davide Rossi,
Ge' Weijers, and other members of the Independent JPEG Group.

IJG is not affiliated with the official ISO JPEG standards committee.


DOCUMENTATION ROADMAP
=====================

This file contains the following sections:

OVERVIEW            General description of JPEG and the IJG software.
LEGAL ISSUES        Copyright, lack of warranty, terms of distribution.
REFERENCES          Where to learn more about JPEG.
ARCHIVE LOCATIONS   Where to find newer versions of this software.
RELATED SOFTWARE    Other stuff you should get.
FILE FORMAT WARS    Software *not* to get.
TO DO               Plans for future IJG releases.

Other documentation files in the distribution are:

User documentation:
  install.doc       How to configure and install the IJG software.
  usage.doc         Usage instructions for cjpeg, djpeg, jpegtran,
                    rdjpgcom, and wrjpgcom.
  *.1               Unix-style man pages for programs (same info as usage.doc).
  wizard.doc        Advanced usage instructions for JPEG wizards only.
  change.log        Version-to-version change highlights.
Programmer and internal documentation:
  libjpeg.doc       How to use the JPEG library in your own programs.
  example.c         Sample code for calling the JPEG library.
  structure.doc     Overview of the JPEG library's internal structure.
  filelist.doc      Road map of IJG files.
  coderules.doc     Coding style rules --- please read if you contribute code.

Please read at least the files install.doc and usage.doc.  Useful information
can also be found in the JPEG FAQ (Frequently Asked Questions) article.  See
ARCHIVE LOCATIONS below to find out where to obtain the FAQ article.

If you want to understand how the JPEG code works, we suggest reading one or
more of the REFERENCES, then looking at the documentation files (in roughly
the order listed) before diving into the code.


OVERVIEW
========

This package contains C software to implement JPEG image compression and
decompression.  JPEG (pronounced "jay-peg") is a standardized compression
method for full-color and gray-scale images.  JPEG is intended for compressing
"real-world" scenes; line drawings, cartoons and other non-realistic images
are not its strong suit.  JPEG is lossy, meaning that the output image is not
exactly identical to the input image.  Hence you must not use JPEG if you
have to have identical output bits.  However, on typical photographic images,
very good compression levels can be obtained with no visible change, and
remarkably high compression levels are possible if you can tolerate a
low-quality image.  For more details, see the references, or just experiment
with various compression settings.

This software implements JPEG baseline, extended-sequential, and progressive
compression processes.  Provision is made for supporting all variants of these
processes, although some uncommon parameter settings aren't implemented yet.
For legal reasons, we are not distributing code for the arithmetic-coding
variants of JPEG; see LEGAL ISSUES.  We have made no provision for supporting
the hierarchical or lossless processes defined in the standard.

We provide a set of library routines for reading and writing JPEG image files,
plus two sample applications "cjpeg" and "djpeg", which use the library to
perform conversion between JPEG and some other popular image file formats.
The library is intended to be reused in other applications.

In order to support file conversion and viewing software, we have included
considerable functionality beyond the bare JPEG coding/decoding capability;
for example, the color quantization modules are not strictly part of JPEG
decoding, but they are essential for output to colormapped file formats or
colormapped displays.  These extra functions can be compiled out of the
library if not required for a particular application.  We have also included
"jpegtran", a utility for lossless transcoding between different JPEG
processes, and "rdjpgcom" and "wrjpgcom", two simple applications for
inserting and extracting textual comments in JFIF files.

The emphasis in designing this software has been on achieving portability and
flexibility, while also making it fast enough to be useful.  In particular,
the software is not intended to be read as a tutorial on JPEG.  (See the
REFERENCES section for introductory material.)  Rather, it is intended to
be reliable, portable, industrial-strength code.  We do not claim to have
achieved that goal in every aspect of the software, but we strive for it.

We welcome the use of this software as a component of commercial products.
No royalty is required, but we do ask for an acknowledgement in product
documentation, as described under LEGAL ISSUES.


LEGAL ISSUES
============

In plain English:

1. We don't promise that this software works.  (But if you find any bugs,
   please let us know!)
2. You can use this software for whatever you want.  You don't have to pay us.
3. You may not pretend that you wrote this software.  If you use it in a
   program, you must acknowledge somewhere in your documentation that
   you've used the IJG code.

In legalese:

The authors make NO WARRANTY or representation, either express or implied,
with respect to this software, its quality, accuracy, merchantability, or
fitness for a particular purpose.  This software is provided "AS IS", and you,
its user, assume the entire risk as to its quality and accuracy.

This software is copyright (C) 1991, 1992, 1993, 1994, 1995, Thomas G. Lane.
All Rights Reserved except as specified below.

Permission is hereby granted to use, copy, modify, and distribute this
software (or portions thereof) for any purpose, without fee, subject to these
conditions:
(1) If any part of the source code for this software is distributed, then this
README file must be included, with this copyright and no-warranty notice
unaltered; and any additions, deletions, or changes to the original files
must be clearly indicated in accompanying documentation.
(2) If only executable code is distributed, then the accompanying
documentation must state that "this software is based in part on the work of
the Independent JPEG Group".
(3) Permission for use of this software is granted only if the user accepts
full responsibility for any undesirable consequences; the authors accept
NO LIABILITY for damages of any kind.

These conditions apply to any software derived from or based on the IJG code,
not just to the unmodified library.  If you use our work, you ought to
acknowledge us.

Permission is NOT granted for the use of any IJG author's name or company name
in advertising or publicity relating to this software or products derived from
it.  This software may be referred to only as "the Independent JPEG Group's
software".

We specifically permit and encourage the use of this software as the basis of
commercial products, provided that all warranty or liability claims are
assumed by the product vendor.


ansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
ansi2knr.c is NOT covered by the above copyright and conditions, but instead
by the usual distribution terms of the Free Software Foundation; principally,
that you must include source code if you redistribute it.  (See the file
ansi2knr.c for full details.)  However, since ansi2knr.c is not needed as part
of any program generated from the IJG code, this does not limit you more than
the foregoing paragraphs do.

The configuration script "configure" was produced with GNU Autoconf.  It
is copyright by the Free Software Foundation but is freely distributable.

It appears that the arithmetic coding option of the JPEG spec is covered by
patents owned by IBM, AT&T, and Mitsubishi.  Hence arithmetic coding cannot
legally be used without obtaining one or more licenses.  For this reason,
support for arithmetic coding has been removed from the free JPEG software.
(Since arithmetic coding provides only a marginal gain over the unpatented
Huffman mode, it is unlikely that very many implementations will support it.)
So far as we are aware, there are no patent restrictions on the remaining
code.

WARNING: Unisys has begun to enforce their patent on LZW compression against
GIF encoders and decoders.  You will need a license from Unisys to use the
included rdgif.c or wrgif.c files in a commercial or shareware application.
At this time, Unisys is not enforcing their patent against freeware, so
distribution of this package remains legal.  However, we intend to remove
GIF support from the IJG package as soon as a suitable replacement format
becomes reasonably popular.

We are required to state that
    "The Graphics Interchange Format(c) is the Copyright property of
    CompuServe Incorporated.  GIF(sm) is a Service Mark property of
    CompuServe Incorporated."


REFERENCES
==========

We highly recommend reading one or more of these references before trying to
understand the innards of the JPEG software.

The best short technical introduction to the JPEG compression algorithm is
        Wallace, Gregory K.  "The JPEG Still Picture Compression Standard",
        Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44.
(Adjacent articles in that issue discuss MPEG motion picture compression,
applications of JPEG, and related topics.)  If you don't have the CACM issue
handy, a PostScript file containing a revised version of Wallace's article
is available at ftp.uu.net, graphics/jpeg/wallace.ps.gz.  The file (actually
a preprint for an article that appeared in IEEE Trans. Consumer Electronics)
omits the sample images that appeared in CACM, but it includes corrections
and some added material.  Note: the Wallace article is copyright ACM and
IEEE, and it may not be used for commercial purposes.

A somewhat less technical, more leisurely introduction to JPEG can be found in
"The Data Compression Book" by Mark Nelson, published by M&T Books (Redwood
City, CA), 1991, ISBN 1-55851-216-0.  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.  (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 US,
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 number ISO/IEC IS 10918-1.  Part 2 is titled
"Digital Compression and Coding of Continuous-tone Still Images, Part 2:
Compliance testing" and has document number ISO/IEC IS 10918-2.

Extensions to the original JPEG standard are defined in Part 3, a new ISO
document.  Part 3 is undergoing ISO balloting and is expected to be approved
by the end of 1995.  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 at ftp.uu.net, file
graphics/jpeg/jfif.ps.gz.  It can also be obtained by e-mail from the C-Cube
mail server, netlib@c3.pla.ca.us.  Send the message "send jfif_ps from jpeg"
to the server to obtain the JFIF document; send the message "help" if you have
trouble.

The TIFF 6.0 file format specification can be obtained by FTP from sgi.com
(192.48.153.1), file graphics/tiff/TIFF6.ps.Z; or you can order a printed
copy from Aldus Corp. at (206) 628-6593.  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 sgi.com or
from 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 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 graphics/jpeg/jpegsrc.v6.tar.gz.  If you are on the Internet, you
can retrieve files from ftp.uu.net by standard anonymous FTP.  If you don't
have FTP 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; in particular,
you can probably find a copy at any site that archives comp.sources.misc
submissions.  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.coast.net:/SimTel/msdos/graphics/), or on CompuServe
in the GRAPHSUPPORT forum (GO 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, news.answers, and other groups.  You can
always obtain the latest version from the news.answers archive at
rtfm.mit.edu.  By FTP, fetch /pub/usenet/news.answers/jpeg-faq/part1 and
.../part2.  If you don't have FTP, 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 image 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.  You can obtain this package by FTP from ftp.x.org
(contrib/pbmplus*.tar.Z) or ftp.ee.lbl.gov (pbmplus*.tar.Z).  There is also
a newer update of this package called NETPBM, available from
wuarchive.wustl.edu under directory /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 havefun.stanford.edu in directory 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.


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
=====

In future versions, we are considering supporting some of the upcoming JPEG
Part 3 extensions --- principally, variable quantization and the SPIFF file
format.

Tuning the software for better behavior at low quality/high compression
settings is also of interest.  The current method for scaling the
quantization tables is known not to be very good at low Q values.

As always, speeding things up is high on our priority list.

Please send bug reports, offers of help, etc. to jpeg-info@uunet.uu.net.
00000000  42 54 50 43 20 75 73 65  73 20 74 68 65 20 49 6e  |BTPC uses the In|
00000010  64 65 70 65 6e 64 65 6e  74 20 4a 50 45 47 20 47  |dependent JPEG G|
00000020  72 6f 75 70 27 73 20 4a  50 45 47 20 73 6f 66 74  |roup's JPEG soft|
00000030  77 61 72 65 20 69 6e 20  74 68 65 20 66 69 6c 65  |ware in the file|
00000040  20 63 6f 6c 6d 61 70 2e  43 20 6f 6e 6c 79 2e 0a  | colmap.C only..|
00000050  49 4a 47 20 72 65 71 75  69 72 65 20 74 68 61 74  |IJG require that|
00000060  20 74 68 65 69 72 20 52  45 41 44 4d 45 20 66 69  | their README fi|
00000070  6c 65 20 62 65 20 64 69  73 74 72 69 62 75 74 65  |le be distribute|
00000080  64 20 77 69 74 68 20 61  6e 79 20 6d 6f 64 69 66  |d with any modif|
00000090  69 65 64 20 76 65 72 73  69 6f 6e 20 6f 66 0a 74  |ied version of.t|
000000a0  68 65 69 72 20 63 6f 64  65 2e 20 53 6f 20 68 65  |heir code. So he|
000000b0  72 65 20 69 74 20 69 73  3a 0a 0a 3d 3d 3d 3d 3d  |re it is:..=====|
000000c0  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
*
00000100  3d 3d 3d 3d 3d 0a 0a 54  68 65 20 49 6e 64 65 70  |=====..The Indep|
00000110  65 6e 64 65 6e 74 20 4a  50 45 47 20 47 72 6f 75  |endent JPEG Grou|
00000120  70 27 73 20 4a 50 45 47  20 73 6f 66 74 77 61 72  |p's JPEG softwar|
00000130  65 0a 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |e.==============|
00000140  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
00000150  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 0a 0a 52 45  |============..RE|
00000160  41 44 4d 45 20 66 6f 72  20 72 65 6c 65 61 73 65  |ADME for release|
00000170  20 36 20 6f 66 20 32 2d  41 75 67 2d 39 35 0a 3d  | 6 of 2-Aug-95.=|
00000180  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
00000190  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 0a  |===============.|
000001a0  0a 54 68 69 73 20 64 69  73 74 72 69 62 75 74 69  |.This distributi|
000001b0  6f 6e 20 63 6f 6e 74 61  69 6e 73 20 74 68 65 20  |on contains the |
000001c0  73 69 78 74 68 20 70 75  62 6c 69 63 20 72 65 6c  |sixth public rel|
000001d0  65 61 73 65 20 6f 66 20  74 68 65 20 49 6e 64 65  |ease of the Inde|
000001e0  70 65 6e 64 65 6e 74 20  4a 50 45 47 0a 47 72 6f  |pendent JPEG.Gro|
000001f0  75 70 27 73 20 66 72 65  65 20 4a 50 45 47 20 73  |up's free JPEG s|
00000200  6f 66 74 77 61 72 65 2e  20 20 59 6f 75 20 61 72  |oftware.  You ar|
00000210  65 20 77 65 6c 63 6f 6d  65 20 74 6f 20 72 65 64  |e welcome to red|
00000220  69 73 74 72 69 62 75 74  65 20 74 68 69 73 20 73  |istribute this s|
00000230  6f 66 74 77 61 72 65 20  61 6e 64 0a 74 6f 20 75  |oftware and.to u|
00000240  73 65 20 69 74 20 66 6f  72 20 61 6e 79 20 70 75  |se it for any pu|
00000250  72 70 6f 73 65 2c 20 73  75 62 6a 65 63 74 20 74  |rpose, subject t|
00000260  6f 20 74 68 65 20 63 6f  6e 64 69 74 69 6f 6e 73  |o the conditions|
00000270  20 75 6e 64 65 72 20 4c  45 47 41 4c 20 49 53 53  | under LEGAL ISS|
00000280  55 45 53 2c 20 62 65 6c  6f 77 2e 0a 0a 53 65 72  |UES, below...Ser|
00000290  69 6f 75 73 20 75 73 65  72 73 20 6f 66 20 74 68  |ious users of th|
000002a0  69 73 20 73 6f 66 74 77  61 72 65 20 28 70 61 72  |is software (par|
000002b0  74 69 63 75 6c 61 72 6c  79 20 74 68 6f 73 65 20  |ticularly those |
000002c0  69 6e 63 6f 72 70 6f 72  61 74 69 6e 67 20 69 74  |incorporating it|
000002d0  20 69 6e 74 6f 0a 6c 61  72 67 65 72 20 70 72 6f  | into.larger pro|
000002e0  67 72 61 6d 73 29 20 73  68 6f 75 6c 64 20 63 6f  |grams) should co|
000002f0  6e 74 61 63 74 20 49 4a  47 20 61 74 20 6a 70 65  |ntact IJG at jpe|
00000300  67 2d 69 6e 66 6f 40 75  75 6e 65 74 2e 75 75 2e  |g-info@uunet.uu.|
00000310  6e 65 74 20 74 6f 20 62  65 20 61 64 64 65 64 20  |net to be added |
00000320  74 6f 0a 6f 75 72 20 65  6c 65 63 74 72 6f 6e 69  |to.our electroni|
00000330  63 20 6d 61 69 6c 69 6e  67 20 6c 69 73 74 2e 20  |c mailing list. |
00000340  20 4d 61 69 6c 69 6e 67  20 6c 69 73 74 20 6d 65  | Mailing list me|
00000350  6d 62 65 72 73 20 61 72  65 20 6e 6f 74 69 66 69  |mbers are notifi|
00000360  65 64 20 6f 66 20 75 70  64 61 74 65 73 0a 61 6e  |ed of updates.an|
00000370  64 20 68 61 76 65 20 61  20 63 68 61 6e 63 65 20  |d have a chance |
00000380  74 6f 20 70 61 72 74 69  63 69 70 61 74 65 20 69  |to participate i|
00000390  6e 20 74 65 63 68 6e 69  63 61 6c 20 64 69 73 63  |n technical disc|
000003a0  75 73 73 69 6f 6e 73 2c  20 65 74 63 2e 0a 0a 54  |ussions, etc...T|
000003b0  68 69 73 20 73 6f 66 74  77 61 72 65 20 69 73 20  |his software is |
000003c0  74 68 65 20 77 6f 72 6b  20 6f 66 20 54 6f 6d 20  |the work of Tom |
000003d0  4c 61 6e 65 2c 20 50 68  69 6c 69 70 20 47 6c 61  |Lane, Philip Gla|
000003e0  64 73 74 6f 6e 65 2c 20  4c 75 69 73 20 4f 72 74  |dstone, Luis Ort|
000003f0  69 7a 2c 20 4a 69 6d 0a  42 6f 75 63 68 65 72 2c  |iz, Jim.Boucher,|
00000400  20 4c 65 65 20 43 72 6f  63 6b 65 72 2c 20 4a 75  | Lee Crocker, Ju|
00000410  6c 69 61 6e 20 4d 69 6e  67 75 69 6c 6c 6f 6e 2c  |lian Minguillon,|
00000420  20 47 65 6f 72 67 65 20  50 68 69 6c 6c 69 70 73  | George Phillips|
00000430  2c 20 44 61 76 69 64 65  20 52 6f 73 73 69 2c 0a  |, Davide Rossi,.|
00000440  47 65 27 20 57 65 69 6a  65 72 73 2c 20 61 6e 64  |Ge' Weijers, and|
00000450  20 6f 74 68 65 72 20 6d  65 6d 62 65 72 73 20 6f  | other members o|
00000460  66 20 74 68 65 20 49 6e  64 65 70 65 6e 64 65 6e  |f the Independen|
00000470  74 20 4a 50 45 47 20 47  72 6f 75 70 2e 0a 0a 49  |t JPEG Group...I|
00000480  4a 47 20 69 73 20 6e 6f  74 20 61 66 66 69 6c 69  |JG is not affili|
00000490  61 74 65 64 20 77 69 74  68 20 74 68 65 20 6f 66  |ated with the of|
000004a0  66 69 63 69 61 6c 20 49  53 4f 20 4a 50 45 47 20  |ficial ISO JPEG |
000004b0  73 74 61 6e 64 61 72 64  73 20 63 6f 6d 6d 69 74  |standards commit|
000004c0  74 65 65 2e 0a 0a 0a 44  4f 43 55 4d 45 4e 54 41  |tee....DOCUMENTA|
000004d0  54 49 4f 4e 20 52 4f 41  44 4d 41 50 0a 3d 3d 3d  |TION ROADMAP.===|
000004e0  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
000004f0  3d 3d 0a 0a 54 68 69 73  20 66 69 6c 65 20 63 6f  |==..This file co|
00000500  6e 74 61 69 6e 73 20 74  68 65 20 66 6f 6c 6c 6f  |ntains the follo|
00000510  77 69 6e 67 20 73 65 63  74 69 6f 6e 73 3a 0a 0a  |wing sections:..|
00000520  4f 56 45 52 56 49 45 57  20 20 20 20 20 20 20 20  |OVERVIEW        |
00000530  20 20 20 20 47 65 6e 65  72 61 6c 20 64 65 73 63  |    General desc|
00000540  72 69 70 74 69 6f 6e 20  6f 66 20 4a 50 45 47 20  |ription of JPEG |
00000550  61 6e 64 20 74 68 65 20  49 4a 47 20 73 6f 66 74  |and the IJG soft|
00000560  77 61 72 65 2e 0a 4c 45  47 41 4c 20 49 53 53 55  |ware..LEGAL ISSU|
00000570  45 53 20 20 20 20 20 20  20 20 43 6f 70 79 72 69  |ES        Copyri|
00000580  67 68 74 2c 20 6c 61 63  6b 20 6f 66 20 77 61 72  |ght, lack of war|
00000590  72 61 6e 74 79 2c 20 74  65 72 6d 73 20 6f 66 20  |ranty, terms of |
000005a0  64 69 73 74 72 69 62 75  74 69 6f 6e 2e 0a 52 45  |distribution..RE|
000005b0  46 45 52 45 4e 43 45 53  20 20 20 20 20 20 20 20  |FERENCES        |
000005c0  20 20 57 68 65 72 65 20  74 6f 20 6c 65 61 72 6e  |  Where to learn|
000005d0  20 6d 6f 72 65 20 61 62  6f 75 74 20 4a 50 45 47  | more about JPEG|
000005e0  2e 0a 41 52 43 48 49 56  45 20 4c 4f 43 41 54 49  |..ARCHIVE LOCATI|
000005f0  4f 4e 53 20 20 20 57 68  65 72 65 20 74 6f 20 66  |ONS   Where to f|
00000600  69 6e 64 20 6e 65 77 65  72 20 76 65 72 73 69 6f  |ind newer versio|
00000610  6e 73 20 6f 66 20 74 68  69 73 20 73 6f 66 74 77  |ns of this softw|
00000620  61 72 65 2e 0a 52 45 4c  41 54 45 44 20 53 4f 46  |are..RELATED SOF|
00000630  54 57 41 52 45 20 20 20  20 4f 74 68 65 72 20 73  |TWARE    Other s|
00000640  74 75 66 66 20 79 6f 75  20 73 68 6f 75 6c 64 20  |tuff you should |
00000650  67 65 74 2e 0a 46 49 4c  45 20 46 4f 52 4d 41 54  |get..FILE FORMAT|
00000660  20 57 41 52 53 20 20 20  20 53 6f 66 74 77 61 72  | WARS    Softwar|
00000670  65 20 2a 6e 6f 74 2a 20  74 6f 20 67 65 74 2e 0a  |e *not* to get..|
00000680  54 4f 20 44 4f 20 20 20  20 20 20 20 20 20 20 20  |TO DO           |
00000690  20 20 20 20 50 6c 61 6e  73 20 66 6f 72 20 66 75  |    Plans for fu|
000006a0  74 75 72 65 20 49 4a 47  20 72 65 6c 65 61 73 65  |ture IJG release|
000006b0  73 2e 0a 0a 4f 74 68 65  72 20 64 6f 63 75 6d 65  |s...Other docume|
000006c0  6e 74 61 74 69 6f 6e 20  66 69 6c 65 73 20 69 6e  |ntation files in|
000006d0  20 74 68 65 20 64 69 73  74 72 69 62 75 74 69 6f  | the distributio|
000006e0  6e 20 61 72 65 3a 0a 0a  55 73 65 72 20 64 6f 63  |n are:..User doc|
000006f0  75 6d 65 6e 74 61 74 69  6f 6e 3a 0a 20 20 69 6e  |umentation:.  in|
00000700  73 74 61 6c 6c 2e 64 6f  63 20 20 20 20 20 20 20  |stall.doc       |
00000710  48 6f 77 20 74 6f 20 63  6f 6e 66 69 67 75 72 65  |How to configure|
00000720  20 61 6e 64 20 69 6e 73  74 61 6c 6c 20 74 68 65  | and install the|
00000730  20 49 4a 47 20 73 6f 66  74 77 61 72 65 2e 0a 20  | IJG software.. |
00000740  20 75 73 61 67 65 2e 64  6f 63 20 20 20 20 20 20  | usage.doc      |
00000750  20 20 20 55 73 61 67 65  20 69 6e 73 74 72 75 63  |   Usage instruc|
00000760  74 69 6f 6e 73 20 66 6f  72 20 63 6a 70 65 67 2c  |tions for cjpeg,|
00000770  20 64 6a 70 65 67 2c 20  6a 70 65 67 74 72 61 6e  | djpeg, jpegtran|
00000780  2c 0a 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |,.              |
00000790  20 20 20 20 20 20 72 64  6a 70 67 63 6f 6d 2c 20  |      rdjpgcom, |
000007a0  61 6e 64 20 77 72 6a 70  67 63 6f 6d 2e 0a 20 20  |and wrjpgcom..  |
000007b0  2a 2e 31 20 20 20 20 20  20 20 20 20 20 20 20 20  |*.1             |
000007c0  20 20 55 6e 69 78 2d 73  74 79 6c 65 20 6d 61 6e  |  Unix-style man|
000007d0  20 70 61 67 65 73 20 66  6f 72 20 70 72 6f 67 72  | pages for progr|
000007e0  61 6d 73 20 28 73 61 6d  65 20 69 6e 66 6f 20 61  |ams (same info a|
000007f0  73 20 75 73 61 67 65 2e  64 6f 63 29 2e 0a 20 20  |s usage.doc)..  |
00000800  77 69 7a 61 72 64 2e 64  6f 63 20 20 20 20 20 20  |wizard.doc      |
00000810  20 20 41 64 76 61 6e 63  65 64 20 75 73 61 67 65  |  Advanced usage|
00000820  20 69 6e 73 74 72 75 63  74 69 6f 6e 73 20 66 6f  | instructions fo|
00000830  72 20 4a 50 45 47 20 77  69 7a 61 72 64 73 20 6f  |r JPEG wizards o|
00000840  6e 6c 79 2e 0a 20 20 63  68 61 6e 67 65 2e 6c 6f  |nly..  change.lo|
00000850  67 20 20 20 20 20 20 20  20 56 65 72 73 69 6f 6e  |g        Version|
00000860  2d 74 6f 2d 76 65 72 73  69 6f 6e 20 63 68 61 6e  |-to-version chan|
00000870  67 65 20 68 69 67 68 6c  69 67 68 74 73 2e 0a 50  |ge highlights..P|
00000880  72 6f 67 72 61 6d 6d 65  72 20 61 6e 64 20 69 6e  |rogrammer and in|
00000890  74 65 72 6e 61 6c 20 64  6f 63 75 6d 65 6e 74 61  |ternal documenta|
000008a0  74 69 6f 6e 3a 0a 20 20  6c 69 62 6a 70 65 67 2e  |tion:.  libjpeg.|
000008b0  64 6f 63 20 20 20 20 20  20 20 48 6f 77 20 74 6f  |doc       How to|
000008c0  20 75 73 65 20 74 68 65  20 4a 50 45 47 20 6c 69  | use the JPEG li|
000008d0  62 72 61 72 79 20 69 6e  20 79 6f 75 72 20 6f 77  |brary in your ow|
000008e0  6e 20 70 72 6f 67 72 61  6d 73 2e 0a 20 20 65 78  |n programs..  ex|
000008f0  61 6d 70 6c 65 2e 63 20  20 20 20 20 20 20 20 20  |ample.c         |
00000900  53 61 6d 70 6c 65 20 63  6f 64 65 20 66 6f 72 20  |Sample code for |
00000910  63 61 6c 6c 69 6e 67 20  74 68 65 20 4a 50 45 47  |calling the JPEG|
00000920  20 6c 69 62 72 61 72 79  2e 0a 20 20 73 74 72 75  | library..  stru|
00000930  63 74 75 72 65 2e 64 6f  63 20 20 20 20 20 4f 76  |cture.doc     Ov|
00000940  65 72 76 69 65 77 20 6f  66 20 74 68 65 20 4a 50  |erview of the JP|
00000950  45 47 20 6c 69 62 72 61  72 79 27 73 20 69 6e 74  |EG library's int|
00000960  65 72 6e 61 6c 20 73 74  72 75 63 74 75 72 65 2e  |ernal structure.|
00000970  0a 20 20 66 69 6c 65 6c  69 73 74 2e 64 6f 63 20  |.  filelist.doc |
00000980  20 20 20 20 20 52 6f 61  64 20 6d 61 70 20 6f 66  |     Road map of|
00000990  20 49 4a 47 20 66 69 6c  65 73 2e 0a 20 20 63 6f  | IJG files..  co|
000009a0  64 65 72 75 6c 65 73 2e  64 6f 63 20 20 20 20 20  |derules.doc     |
000009b0  43 6f 64 69 6e 67 20 73  74 79 6c 65 20 72 75 6c  |Coding style rul|
000009c0  65 73 20 2d 2d 2d 20 70  6c 65 61 73 65 20 72 65  |es --- please re|
000009d0  61 64 20 69 66 20 79 6f  75 20 63 6f 6e 74 72 69  |ad if you contri|
000009e0  62 75 74 65 20 63 6f 64  65 2e 0a 0a 50 6c 65 61  |bute code...Plea|
000009f0  73 65 20 72 65 61 64 20  61 74 20 6c 65 61 73 74  |se read at least|
00000a00  20 74 68 65 20 66 69 6c  65 73 20 69 6e 73 74 61  | the files insta|
00000a10  6c 6c 2e 64 6f 63 20 61  6e 64 20 75 73 61 67 65  |ll.doc and usage|
00000a20  2e 64 6f 63 2e 20 20 55  73 65 66 75 6c 20 69 6e  |.doc.  Useful in|
00000a30  66 6f 72 6d 61 74 69 6f  6e 0a 63 61 6e 20 61 6c  |formation.can al|
00000a40  73 6f 20 62 65 20 66 6f  75 6e 64 20 69 6e 20 74  |so be found in t|
00000a50  68 65 20 4a 50 45 47 20  46 41 51 20 28 46 72 65  |he JPEG FAQ (Fre|
00000a60  71 75 65 6e 74 6c 79 20  41 73 6b 65 64 20 51 75  |quently Asked Qu|
00000a70  65 73 74 69 6f 6e 73 29  20 61 72 74 69 63 6c 65  |estions) article|
00000a80  2e 20 20 53 65 65 0a 41  52 43 48 49 56 45 20 4c  |.  See.ARCHIVE L|
00000a90  4f 43 41 54 49 4f 4e 53  20 62 65 6c 6f 77 20 74  |OCATIONS below t|
00000aa0  6f 20 66 69 6e 64 20 6f  75 74 20 77 68 65 72 65  |o find out where|
00000ab0  20 74 6f 20 6f 62 74 61  69 6e 20 74 68 65 20 46  | to obtain the F|
00000ac0  41 51 20 61 72 74 69 63  6c 65 2e 0a 0a 49 66 20  |AQ article...If |
00000ad0  79 6f 75 20 77 61 6e 74  20 74 6f 20 75 6e 64 65  |you want to unde|
00000ae0  72 73 74 61 6e 64 20 68  6f 77 20 74 68 65 20 4a  |rstand how the J|
00000af0  50 45 47 20 63 6f 64 65  20 77 6f 72 6b 73 2c 20  |PEG code works, |
00000b00  77 65 20 73 75 67 67 65  73 74 20 72 65 61 64 69  |we suggest readi|
00000b10  6e 67 20 6f 6e 65 20 6f  72 0a 6d 6f 72 65 20 6f  |ng one or.more o|
00000b20  66 20 74 68 65 20 52 45  46 45 52 45 4e 43 45 53  |f the REFERENCES|
00000b30  2c 20 74 68 65 6e 20 6c  6f 6f 6b 69 6e 67 20 61  |, then looking a|
00000b40  74 20 74 68 65 20 64 6f  63 75 6d 65 6e 74 61 74  |t the documentat|
00000b50  69 6f 6e 20 66 69 6c 65  73 20 28 69 6e 20 72 6f  |ion files (in ro|
00000b60  75 67 68 6c 79 0a 74 68  65 20 6f 72 64 65 72 20  |ughly.the order |
00000b70  6c 69 73 74 65 64 29 20  62 65 66 6f 72 65 20 64  |listed) before d|
00000b80  69 76 69 6e 67 20 69 6e  74 6f 20 74 68 65 20 63  |iving into the c|
00000b90  6f 64 65 2e 0a 0a 0a 4f  56 45 52 56 49 45 57 0a  |ode....OVERVIEW.|
00000ba0  3d 3d 3d 3d 3d 3d 3d 3d  0a 0a 54 68 69 73 20 70  |========..This p|
00000bb0  61 63 6b 61 67 65 20 63  6f 6e 74 61 69 6e 73 20  |ackage contains |
00000bc0  43 20 73 6f 66 74 77 61  72 65 20 74 6f 20 69 6d  |C software to im|
00000bd0  70 6c 65 6d 65 6e 74 20  4a 50 45 47 20 69 6d 61  |plement JPEG ima|
00000be0  67 65 20 63 6f 6d 70 72  65 73 73 69 6f 6e 20 61  |ge compression a|
00000bf0  6e 64 0a 64 65 63 6f 6d  70 72 65 73 73 69 6f 6e  |nd.decompression|
00000c00  2e 20 20 4a 50 45 47 20  28 70 72 6f 6e 6f 75 6e  |.  JPEG (pronoun|
00000c10  63 65 64 20 22 6a 61 79  2d 70 65 67 22 29 20 69  |ced "jay-peg") i|
00000c20  73 20 61 20 73 74 61 6e  64 61 72 64 69 7a 65 64  |s a standardized|
00000c30  20 63 6f 6d 70 72 65 73  73 69 6f 6e 0a 6d 65 74  | compression.met|
00000c40  68 6f 64 20 66 6f 72 20  66 75 6c 6c 2d 63 6f 6c  |hod for full-col|
00000c50  6f 72 20 61 6e 64 20 67  72 61 79 2d 73 63 61 6c  |or and gray-scal|
00000c60  65 20 69 6d 61 67 65 73  2e 20 20 4a 50 45 47 20  |e images.  JPEG |
00000c70  69 73 20 69 6e 74 65 6e  64 65 64 20 66 6f 72 20  |is intended for |
00000c80  63 6f 6d 70 72 65 73 73  69 6e 67 0a 22 72 65 61  |compressing."rea|
00000c90  6c 2d 77 6f 72 6c 64 22  20 73 63 65 6e 65 73 3b  |l-world" scenes;|
00000ca0  20 6c 69 6e 65 20 64 72  61 77 69 6e 67 73 2c 20  | line drawings, |
00000cb0  63 61 72 74 6f 6f 6e 73  20 61 6e 64 20 6f 74 68  |cartoons and oth|
00000cc0  65 72 20 6e 6f 6e 2d 72  65 61 6c 69 73 74 69 63  |er non-realistic|
00000cd0  20 69 6d 61 67 65 73 0a  61 72 65 20 6e 6f 74 20  | images.are not |
00000ce0  69 74 73 20 73 74 72 6f  6e 67 20 73 75 69 74 2e  |its strong suit.|
00000cf0  20 20 4a 50 45 47 20 69  73 20 6c 6f 73 73 79 2c  |  JPEG is lossy,|
00000d00  20 6d 65 61 6e 69 6e 67  20 74 68 61 74 20 74 68  | meaning that th|
00000d10  65 20 6f 75 74 70 75 74  20 69 6d 61 67 65 20 69  |e output image i|
00000d20  73 20 6e 6f 74 0a 65 78  61 63 74 6c 79 20 69 64  |s not.exactly id|
00000d30  65 6e 74 69 63 61 6c 20  74 6f 20 74 68 65 20 69  |entical to the i|
00000d40  6e 70 75 74 20 69 6d 61  67 65 2e 20 20 48 65 6e  |nput image.  Hen|
00000d50  63 65 20 79 6f 75 20 6d  75 73 74 20 6e 6f 74 20  |ce you must not |
00000d60  75 73 65 20 4a 50 45 47  20 69 66 20 79 6f 75 0a  |use JPEG if you.|
00000d70  68 61 76 65 20 74 6f 20  68 61 76 65 20 69 64 65  |have to have ide|
00000d80  6e 74 69 63 61 6c 20 6f  75 74 70 75 74 20 62 69  |ntical output bi|
00000d90  74 73 2e 20 20 48 6f 77  65 76 65 72 2c 20 6f 6e  |ts.  However, on|
00000da0  20 74 79 70 69 63 61 6c  20 70 68 6f 74 6f 67 72  | typical photogr|
00000db0  61 70 68 69 63 20 69 6d  61 67 65 73 2c 0a 76 65  |aphic images,.ve|
00000dc0  72 79 20 67 6f 6f 64 20  63 6f 6d 70 72 65 73 73  |ry good compress|
00000dd0  69 6f 6e 20 6c 65 76 65  6c 73 20 63 61 6e 20 62  |ion levels can b|
00000de0  65 20 6f 62 74 61 69 6e  65 64 20 77 69 74 68 20  |e obtained with |
00000df0  6e 6f 20 76 69 73 69 62  6c 65 20 63 68 61 6e 67  |no visible chang|
00000e00  65 2c 20 61 6e 64 0a 72  65 6d 61 72 6b 61 62 6c  |e, and.remarkabl|
00000e10  79 20 68 69 67 68 20 63  6f 6d 70 72 65 73 73 69  |y high compressi|
00000e20  6f 6e 20 6c 65 76 65 6c  73 20 61 72 65 20 70 6f  |on levels are po|
00000e30  73 73 69 62 6c 65 20 69  66 20 79 6f 75 20 63 61  |ssible if you ca|
00000e40  6e 20 74 6f 6c 65 72 61  74 65 20 61 0a 6c 6f 77  |n tolerate a.low|
00000e50  2d 71 75 61 6c 69 74 79  20 69 6d 61 67 65 2e 20  |-quality image. |
00000e60  20 46 6f 72 20 6d 6f 72  65 20 64 65 74 61 69 6c  | For more detail|
00000e70  73 2c 20 73 65 65 20 74  68 65 20 72 65 66 65 72  |s, see the refer|
00000e80  65 6e 63 65 73 2c 20 6f  72 20 6a 75 73 74 20 65  |ences, or just e|
00000e90  78 70 65 72 69 6d 65 6e  74 0a 77 69 74 68 20 76  |xperiment.with v|
00000ea0  61 72 69 6f 75 73 20 63  6f 6d 70 72 65 73 73 69  |arious compressi|
00000eb0  6f 6e 20 73 65 74 74 69  6e 67 73 2e 0a 0a 54 68  |on settings...Th|
00000ec0  69 73 20 73 6f 66 74 77  61 72 65 20 69 6d 70 6c  |is software impl|
00000ed0  65 6d 65 6e 74 73 20 4a  50 45 47 20 62 61 73 65  |ements JPEG base|
00000ee0  6c 69 6e 65 2c 20 65 78  74 65 6e 64 65 64 2d 73  |line, extended-s|
00000ef0  65 71 75 65 6e 74 69 61  6c 2c 20 61 6e 64 20 70  |equential, and p|
00000f00  72 6f 67 72 65 73 73 69  76 65 0a 63 6f 6d 70 72  |rogressive.compr|
00000f10  65 73 73 69 6f 6e 20 70  72 6f 63 65 73 73 65 73  |ession processes|
00000f20  2e 20 20 50 72 6f 76 69  73 69 6f 6e 20 69 73 20  |.  Provision is |
00000f30  6d 61 64 65 20 66 6f 72  20 73 75 70 70 6f 72 74  |made for support|
00000f40  69 6e 67 20 61 6c 6c 20  76 61 72 69 61 6e 74 73  |ing all variants|
00000f50  20 6f 66 20 74 68 65 73  65 0a 70 72 6f 63 65 73  | of these.proces|
00000f60  73 65 73 2c 20 61 6c 74  68 6f 75 67 68 20 73 6f  |ses, although so|
00000f70  6d 65 20 75 6e 63 6f 6d  6d 6f 6e 20 70 61 72 61  |me uncommon para|
00000f80  6d 65 74 65 72 20 73 65  74 74 69 6e 67 73 20 61  |meter settings a|
00000f90  72 65 6e 27 74 20 69 6d  70 6c 65 6d 65 6e 74 65  |ren't implemente|
00000fa0  64 20 79 65 74 2e 0a 46  6f 72 20 6c 65 67 61 6c  |d yet..For legal|
00000fb0  20 72 65 61 73 6f 6e 73  2c 20 77 65 20 61 72 65  | reasons, we are|
00000fc0  20 6e 6f 74 20 64 69 73  74 72 69 62 75 74 69 6e  | not distributin|
00000fd0  67 20 63 6f 64 65 20 66  6f 72 20 74 68 65 20 61  |g code for the a|
00000fe0  72 69 74 68 6d 65 74 69  63 2d 63 6f 64 69 6e 67  |rithmetic-coding|
00000ff0  0a 76 61 72 69 61 6e 74  73 20 6f 66 20 4a 50 45  |.variants of JPE|
00001000  47 3b 20 73 65 65 20 4c  45 47 41 4c 20 49 53 53  |G; see LEGAL ISS|
00001010  55 45 53 2e 20 20 57 65  20 68 61 76 65 20 6d 61  |UES.  We have ma|
00001020  64 65 20 6e 6f 20 70 72  6f 76 69 73 69 6f 6e 20  |de no provision |
00001030  66 6f 72 20 73 75 70 70  6f 72 74 69 6e 67 0a 74  |for supporting.t|
00001040  68 65 20 68 69 65 72 61  72 63 68 69 63 61 6c 20  |he hierarchical |
00001050  6f 72 20 6c 6f 73 73 6c  65 73 73 20 70 72 6f 63  |or lossless proc|
00001060  65 73 73 65 73 20 64 65  66 69 6e 65 64 20 69 6e  |esses defined in|
00001070  20 74 68 65 20 73 74 61  6e 64 61 72 64 2e 0a 0a  | the standard...|
00001080  57 65 20 70 72 6f 76 69  64 65 20 61 20 73 65 74  |We provide a set|
00001090  20 6f 66 20 6c 69 62 72  61 72 79 20 72 6f 75 74  | of library rout|
000010a0  69 6e 65 73 20 66 6f 72  20 72 65 61 64 69 6e 67  |ines for reading|
000010b0  20 61 6e 64 20 77 72 69  74 69 6e 67 20 4a 50 45  | and writing JPE|
000010c0  47 20 69 6d 61 67 65 20  66 69 6c 65 73 2c 0a 70  |G image files,.p|
000010d0  6c 75 73 20 74 77 6f 20  73 61 6d 70 6c 65 20 61  |lus two sample a|
000010e0  70 70 6c 69 63 61 74 69  6f 6e 73 20 22 63 6a 70  |pplications "cjp|
000010f0  65 67 22 20 61 6e 64 20  22 64 6a 70 65 67 22 2c  |eg" and "djpeg",|
00001100  20 77 68 69 63 68 20 75  73 65 20 74 68 65 20 6c  | which use the l|
00001110  69 62 72 61 72 79 20 74  6f 0a 70 65 72 66 6f 72  |ibrary to.perfor|
00001120  6d 20 63 6f 6e 76 65 72  73 69 6f 6e 20 62 65 74  |m conversion bet|
00001130  77 65 65 6e 20 4a 50 45  47 20 61 6e 64 20 73 6f  |ween JPEG and so|
00001140  6d 65 20 6f 74 68 65 72  20 70 6f 70 75 6c 61 72  |me other popular|
00001150  20 69 6d 61 67 65 20 66  69 6c 65 20 66 6f 72 6d  | image file form|
00001160  61 74 73 2e 0a 54 68 65  20 6c 69 62 72 61 72 79  |ats..The library|
00001170  20 69 73 20 69 6e 74 65  6e 64 65 64 20 74 6f 20  | is intended to |
00001180  62 65 20 72 65 75 73 65  64 20 69 6e 20 6f 74 68  |be reused in oth|
00001190  65 72 20 61 70 70 6c 69  63 61 74 69 6f 6e 73 2e  |er applications.|
000011a0  0a 0a 49 6e 20 6f 72 64  65 72 20 74 6f 20 73 75  |..In order to su|
000011b0  70 70 6f 72 74 20 66 69  6c 65 20 63 6f 6e 76 65  |pport file conve|
000011c0  72 73 69 6f 6e 20 61 6e  64 20 76 69 65 77 69 6e  |rsion and viewin|
000011d0  67 20 73 6f 66 74 77 61  72 65 2c 20 77 65 20 68  |g software, we h|
000011e0  61 76 65 20 69 6e 63 6c  75 64 65 64 0a 63 6f 6e  |ave included.con|
000011f0  73 69 64 65 72 61 62 6c  65 20 66 75 6e 63 74 69  |siderable functi|
00001200  6f 6e 61 6c 69 74 79 20  62 65 79 6f 6e 64 20 74  |onality beyond t|
00001210  68 65 20 62 61 72 65 20  4a 50 45 47 20 63 6f 64  |he bare JPEG cod|
00001220  69 6e 67 2f 64 65 63 6f  64 69 6e 67 20 63 61 70  |ing/decoding cap|
00001230  61 62 69 6c 69 74 79 3b  0a 66 6f 72 20 65 78 61  |ability;.for exa|
00001240  6d 70 6c 65 2c 20 74 68  65 20 63 6f 6c 6f 72 20  |mple, the color |
00001250  71 75 61 6e 74 69 7a 61  74 69 6f 6e 20 6d 6f 64  |quantization mod|
00001260  75 6c 65 73 20 61 72 65  20 6e 6f 74 20 73 74 72  |ules are not str|
00001270  69 63 74 6c 79 20 70 61  72 74 20 6f 66 20 4a 50  |ictly part of JP|
00001280  45 47 0a 64 65 63 6f 64  69 6e 67 2c 20 62 75 74  |EG.decoding, but|
00001290  20 74 68 65 79 20 61 72  65 20 65 73 73 65 6e 74  | they are essent|
000012a0  69 61 6c 20 66 6f 72 20  6f 75 74 70 75 74 20 74  |ial for output t|
000012b0  6f 20 63 6f 6c 6f 72 6d  61 70 70 65 64 20 66 69  |o colormapped fi|
000012c0  6c 65 20 66 6f 72 6d 61  74 73 20 6f 72 0a 63 6f  |le formats or.co|
000012d0  6c 6f 72 6d 61 70 70 65  64 20 64 69 73 70 6c 61  |lormapped displa|
000012e0  79 73 2e 20 20 54 68 65  73 65 20 65 78 74 72 61  |ys.  These extra|
000012f0  20 66 75 6e 63 74 69 6f  6e 73 20 63 61 6e 20 62  | functions can b|
00001300  65 20 63 6f 6d 70 69 6c  65 64 20 6f 75 74 20 6f  |e compiled out o|
00001310  66 20 74 68 65 0a 6c 69  62 72 61 72 79 20 69 66  |f the.library if|
00001320  20 6e 6f 74 20 72 65 71  75 69 72 65 64 20 66 6f  | not required fo|
00001330  72 20 61 20 70 61 72 74  69 63 75 6c 61 72 20 61  |r a particular a|
00001340  70 70 6c 69 63 61 74 69  6f 6e 2e 20 20 57 65 20  |pplication.  We |
00001350  68 61 76 65 20 61 6c 73  6f 20 69 6e 63 6c 75 64  |have also includ|
00001360  65 64 0a 22 6a 70 65 67  74 72 61 6e 22 2c 20 61  |ed."jpegtran", a|
00001370  20 75 74 69 6c 69 74 79  20 66 6f 72 20 6c 6f 73  | utility for los|
00001380  73 6c 65 73 73 20 74 72  61 6e 73 63 6f 64 69 6e  |sless transcodin|
00001390  67 20 62 65 74 77 65 65  6e 20 64 69 66 66 65 72  |g between differ|
000013a0  65 6e 74 20 4a 50 45 47  0a 70 72 6f 63 65 73 73  |ent JPEG.process|
000013b0  65 73 2c 20 61 6e 64 20  22 72 64 6a 70 67 63 6f  |es, and "rdjpgco|
000013c0  6d 22 20 61 6e 64 20 22  77 72 6a 70 67 63 6f 6d  |m" and "wrjpgcom|
000013d0  22 2c 20 74 77 6f 20 73  69 6d 70 6c 65 20 61 70  |", two simple ap|
000013e0  70 6c 69 63 61 74 69 6f  6e 73 20 66 6f 72 0a 69  |plications for.i|
000013f0  6e 73 65 72 74 69 6e 67  20 61 6e 64 20 65 78 74  |nserting and ext|
00001400  72 61 63 74 69 6e 67 20  74 65 78 74 75 61 6c 20  |racting textual |
00001410  63 6f 6d 6d 65 6e 74 73  20 69 6e 20 4a 46 49 46  |comments in JFIF|
00001420  20 66 69 6c 65 73 2e 0a  0a 54 68 65 20 65 6d 70  | files...The emp|
00001430  68 61 73 69 73 20 69 6e  20 64 65 73 69 67 6e 69  |hasis in designi|
00001440  6e 67 20 74 68 69 73 20  73 6f 66 74 77 61 72 65  |ng this software|
00001450  20 68 61 73 20 62 65 65  6e 20 6f 6e 20 61 63 68  | has been on ach|
00001460  69 65 76 69 6e 67 20 70  6f 72 74 61 62 69 6c 69  |ieving portabili|
00001470  74 79 20 61 6e 64 0a 66  6c 65 78 69 62 69 6c 69  |ty and.flexibili|
00001480  74 79 2c 20 77 68 69 6c  65 20 61 6c 73 6f 20 6d  |ty, while also m|
00001490  61 6b 69 6e 67 20 69 74  20 66 61 73 74 20 65 6e  |aking it fast en|
000014a0  6f 75 67 68 20 74 6f 20  62 65 20 75 73 65 66 75  |ough to be usefu|
000014b0  6c 2e 20 20 49 6e 20 70  61 72 74 69 63 75 6c 61  |l.  In particula|
000014c0  72 2c 0a 74 68 65 20 73  6f 66 74 77 61 72 65 20  |r,.the software |
000014d0  69 73 20 6e 6f 74 20 69  6e 74 65 6e 64 65 64 20  |is not intended |
000014e0  74 6f 20 62 65 20 72 65  61 64 20 61 73 20 61 20  |to be read as a |
000014f0  74 75 74 6f 72 69 61 6c  20 6f 6e 20 4a 50 45 47  |tutorial on JPEG|
00001500  2e 20 20 28 53 65 65 20  74 68 65 0a 52 45 46 45  |.  (See the.REFE|
00001510  52 45 4e 43 45 53 20 73  65 63 74 69 6f 6e 20 66  |RENCES section f|
00001520  6f 72 20 69 6e 74 72 6f  64 75 63 74 6f 72 79 20  |or introductory |
00001530  6d 61 74 65 72 69 61 6c  2e 29 20 20 52 61 74 68  |material.)  Rath|
00001540  65 72 2c 20 69 74 20 69  73 20 69 6e 74 65 6e 64  |er, it is intend|
00001550  65 64 20 74 6f 0a 62 65  20 72 65 6c 69 61 62 6c  |ed to.be reliabl|
00001560  65 2c 20 70 6f 72 74 61  62 6c 65 2c 20 69 6e 64  |e, portable, ind|
00001570  75 73 74 72 69 61 6c 2d  73 74 72 65 6e 67 74 68  |ustrial-strength|
00001580  20 63 6f 64 65 2e 20 20  57 65 20 64 6f 20 6e 6f  | code.  We do no|
00001590  74 20 63 6c 61 69 6d 20  74 6f 20 68 61 76 65 0a  |t claim to have.|
000015a0  61 63 68 69 65 76 65 64  20 74 68 61 74 20 67 6f  |achieved that go|
000015b0  61 6c 20 69 6e 20 65 76  65 72 79 20 61 73 70 65  |al in every aspe|
000015c0  63 74 20 6f 66 20 74 68  65 20 73 6f 66 74 77 61  |ct of the softwa|
000015d0  72 65 2c 20 62 75 74 20  77 65 20 73 74 72 69 76  |re, but we striv|
000015e0  65 20 66 6f 72 20 69 74  2e 0a 0a 57 65 20 77 65  |e for it...We we|
000015f0  6c 63 6f 6d 65 20 74 68  65 20 75 73 65 20 6f 66  |lcome the use of|
00001600  20 74 68 69 73 20 73 6f  66 74 77 61 72 65 20 61  | this software a|
00001610  73 20 61 20 63 6f 6d 70  6f 6e 65 6e 74 20 6f 66  |s a component of|
00001620  20 63 6f 6d 6d 65 72 63  69 61 6c 20 70 72 6f 64  | commercial prod|
00001630  75 63 74 73 2e 0a 4e 6f  20 72 6f 79 61 6c 74 79  |ucts..No royalty|
00001640  20 69 73 20 72 65 71 75  69 72 65 64 2c 20 62 75  | is required, bu|
00001650  74 20 77 65 20 64 6f 20  61 73 6b 20 66 6f 72 20  |t we do ask for |
00001660  61 6e 20 61 63 6b 6e 6f  77 6c 65 64 67 65 6d 65  |an acknowledgeme|
00001670  6e 74 20 69 6e 20 70 72  6f 64 75 63 74 0a 64 6f  |nt in product.do|
00001680  63 75 6d 65 6e 74 61 74  69 6f 6e 2c 20 61 73 20  |cumentation, as |
00001690  64 65 73 63 72 69 62 65  64 20 75 6e 64 65 72 20  |described under |
000016a0  4c 45 47 41 4c 20 49 53  53 55 45 53 2e 0a 0a 0a  |LEGAL ISSUES....|
000016b0  4c 45 47 41 4c 20 49 53  53 55 45 53 0a 3d 3d 3d  |LEGAL ISSUES.===|
000016c0  3d 3d 3d 3d 3d 3d 3d 3d  3d 0a 0a 49 6e 20 70 6c  |=========..In pl|
000016d0  61 69 6e 20 45 6e 67 6c  69 73 68 3a 0a 0a 31 2e  |ain English:..1.|
000016e0  20 57 65 20 64 6f 6e 27  74 20 70 72 6f 6d 69 73  | We don't promis|
000016f0  65 20 74 68 61 74 20 74  68 69 73 20 73 6f 66 74  |e that this soft|
00001700  77 61 72 65 20 77 6f 72  6b 73 2e 20 20 28 42 75  |ware works.  (Bu|
00001710  74 20 69 66 20 79 6f 75  20 66 69 6e 64 20 61 6e  |t if you find an|
00001720  79 20 62 75 67 73 2c 0a  20 20 20 70 6c 65 61 73  |y bugs,.   pleas|
00001730  65 20 6c 65 74 20 75 73  20 6b 6e 6f 77 21 29 0a  |e let us know!).|
00001740  32 2e 20 59 6f 75 20 63  61 6e 20 75 73 65 20 74  |2. You can use t|
00001750  68 69 73 20 73 6f 66 74  77 61 72 65 20 66 6f 72  |his software for|
00001760  20 77 68 61 74 65 76 65  72 20 79 6f 75 20 77 61  | whatever you wa|
00001770  6e 74 2e 20 20 59 6f 75  20 64 6f 6e 27 74 20 68  |nt.  You don't h|
00001780  61 76 65 20 74 6f 20 70  61 79 20 75 73 2e 0a 33  |ave to pay us..3|
00001790  2e 20 59 6f 75 20 6d 61  79 20 6e 6f 74 20 70 72  |. You may not pr|
000017a0  65 74 65 6e 64 20 74 68  61 74 20 79 6f 75 20 77  |etend that you w|
000017b0  72 6f 74 65 20 74 68 69  73 20 73 6f 66 74 77 61  |rote this softwa|
000017c0  72 65 2e 20 20 49 66 20  79 6f 75 20 75 73 65 20  |re.  If you use |
000017d0  69 74 20 69 6e 20 61 0a  20 20 20 70 72 6f 67 72  |it in a.   progr|
000017e0  61 6d 2c 20 79 6f 75 20  6d 75 73 74 20 61 63 6b  |am, you must ack|
000017f0  6e 6f 77 6c 65 64 67 65  20 73 6f 6d 65 77 68 65  |nowledge somewhe|
00001800  72 65 20 69 6e 20 79 6f  75 72 20 64 6f 63 75 6d  |re in your docum|
00001810  65 6e 74 61 74 69 6f 6e  20 74 68 61 74 0a 20 20  |entation that.  |
00001820  20 79 6f 75 27 76 65 20  75 73 65 64 20 74 68 65  | you've used the|
00001830  20 49 4a 47 20 63 6f 64  65 2e 0a 0a 49 6e 20 6c  | IJG code...In l|
00001840  65 67 61 6c 65 73 65 3a  0a 0a 54 68 65 20 61 75  |egalese:..The au|
00001850  74 68 6f 72 73 20 6d 61  6b 65 20 4e 4f 20 57 41  |thors make NO WA|
00001860  52 52 41 4e 54 59 20 6f  72 20 72 65 70 72 65 73  |RRANTY or repres|
00001870  65 6e 74 61 74 69 6f 6e  2c 20 65 69 74 68 65 72  |entation, either|
00001880  20 65 78 70 72 65 73 73  20 6f 72 20 69 6d 70 6c  | express or impl|
00001890  69 65 64 2c 0a 77 69 74  68 20 72 65 73 70 65 63  |ied,.with respec|
000018a0  74 20 74 6f 20 74 68 69  73 20 73 6f 66 74 77 61  |t to this softwa|
000018b0  72 65 2c 20 69 74 73 20  71 75 61 6c 69 74 79 2c  |re, its quality,|
000018c0  20 61 63 63 75 72 61 63  79 2c 20 6d 65 72 63 68  | accuracy, merch|
000018d0  61 6e 74 61 62 69 6c 69  74 79 2c 20 6f 72 0a 66  |antability, or.f|
000018e0  69 74 6e 65 73 73 20 66  6f 72 20 61 20 70 61 72  |itness for a par|
000018f0  74 69 63 75 6c 61 72 20  70 75 72 70 6f 73 65 2e  |ticular purpose.|
00001900  20 20 54 68 69 73 20 73  6f 66 74 77 61 72 65 20  |  This software |
00001910  69 73 20 70 72 6f 76 69  64 65 64 20 22 41 53 20  |is provided "AS |
00001920  49 53 22 2c 20 61 6e 64  20 79 6f 75 2c 0a 69 74  |IS", and you,.it|
00001930  73 20 75 73 65 72 2c 20  61 73 73 75 6d 65 20 74  |s user, assume t|
00001940  68 65 20 65 6e 74 69 72  65 20 72 69 73 6b 20 61  |he entire risk a|
00001950  73 20 74 6f 20 69 74 73  20 71 75 61 6c 69 74 79  |s to its quality|
00001960  20 61 6e 64 20 61 63 63  75 72 61 63 79 2e 0a 0a  | and accuracy...|
00001970  54 68 69 73 20 73 6f 66  74 77 61 72 65 20 69 73  |This software is|
00001980  20 63 6f 70 79 72 69 67  68 74 20 28 43 29 20 31  | copyright (C) 1|
00001990  39 39 31 2c 20 31 39 39  32 2c 20 31 39 39 33 2c  |991, 1992, 1993,|
000019a0  20 31 39 39 34 2c 20 31  39 39 35 2c 20 54 68 6f  | 1994, 1995, Tho|
000019b0  6d 61 73 20 47 2e 20 4c  61 6e 65 2e 0a 41 6c 6c  |mas G. Lane..All|
000019c0  20 52 69 67 68 74 73 20  52 65 73 65 72 76 65 64  | Rights Reserved|
000019d0  20 65 78 63 65 70 74 20  61 73 20 73 70 65 63 69  | except as speci|
000019e0  66 69 65 64 20 62 65 6c  6f 77 2e 0a 0a 50 65 72  |fied below...Per|
000019f0  6d 69 73 73 69 6f 6e 20  69 73 20 68 65 72 65 62  |mission is hereb|
00001a00  79 20 67 72 61 6e 74 65  64 20 74 6f 20 75 73 65  |y granted to use|
00001a10  2c 20 63 6f 70 79 2c 20  6d 6f 64 69 66 79 2c 20  |, copy, modify, |
00001a20  61 6e 64 20 64 69 73 74  72 69 62 75 74 65 20 74  |and distribute t|
00001a30  68 69 73 0a 73 6f 66 74  77 61 72 65 20 28 6f 72  |his.software (or|
00001a40  20 70 6f 72 74 69 6f 6e  73 20 74 68 65 72 65 6f  | portions thereo|
00001a50  66 29 20 66 6f 72 20 61  6e 79 20 70 75 72 70 6f  |f) for any purpo|
00001a60  73 65 2c 20 77 69 74 68  6f 75 74 20 66 65 65 2c  |se, without fee,|
00001a70  20 73 75 62 6a 65 63 74  20 74 6f 20 74 68 65 73  | subject to thes|
00001a80  65 0a 63 6f 6e 64 69 74  69 6f 6e 73 3a 0a 28 31  |e.conditions:.(1|
00001a90  29 20 49 66 20 61 6e 79  20 70 61 72 74 20 6f 66  |) If any part of|
00001aa0  20 74 68 65 20 73 6f 75  72 63 65 20 63 6f 64 65  | the source code|
00001ab0  20 66 6f 72 20 74 68 69  73 20 73 6f 66 74 77 61  | for this softwa|
00001ac0  72 65 20 69 73 20 64 69  73 74 72 69 62 75 74 65  |re is distribute|
00001ad0  64 2c 20 74 68 65 6e 20  74 68 69 73 0a 52 45 41  |d, then this.REA|
00001ae0  44 4d 45 20 66 69 6c 65  20 6d 75 73 74 20 62 65  |DME file must be|
00001af0  20 69 6e 63 6c 75 64 65  64 2c 20 77 69 74 68 20  | included, with |
00001b00  74 68 69 73 20 63 6f 70  79 72 69 67 68 74 20 61  |this copyright a|
00001b10  6e 64 20 6e 6f 2d 77 61  72 72 61 6e 74 79 20 6e  |nd no-warranty n|
00001b20  6f 74 69 63 65 0a 75 6e  61 6c 74 65 72 65 64 3b  |otice.unaltered;|
00001b30  20 61 6e 64 20 61 6e 79  20 61 64 64 69 74 69 6f  | and any additio|
00001b40  6e 73 2c 20 64 65 6c 65  74 69 6f 6e 73 2c 20 6f  |ns, deletions, o|
00001b50  72 20 63 68 61 6e 67 65  73 20 74 6f 20 74 68 65  |r changes to the|
00001b60  20 6f 72 69 67 69 6e 61  6c 20 66 69 6c 65 73 0a  | original files.|
00001b70  6d 75 73 74 20 62 65 20  63 6c 65 61 72 6c 79 20  |must be clearly |
00001b80  69 6e 64 69 63 61 74 65  64 20 69 6e 20 61 63 63  |indicated in acc|
00001b90  6f 6d 70 61 6e 79 69 6e  67 20 64 6f 63 75 6d 65  |ompanying docume|
00001ba0  6e 74 61 74 69 6f 6e 2e  0a 28 32 29 20 49 66 20  |ntation..(2) If |
00001bb0  6f 6e 6c 79 20 65 78 65  63 75 74 61 62 6c 65 20  |only executable |
00001bc0  63 6f 64 65 20 69 73 20  64 69 73 74 72 69 62 75  |code is distribu|
00001bd0  74 65 64 2c 20 74 68 65  6e 20 74 68 65 20 61 63  |ted, then the ac|
00001be0  63 6f 6d 70 61 6e 79 69  6e 67 0a 64 6f 63 75 6d  |companying.docum|
00001bf0  65 6e 74 61 74 69 6f 6e  20 6d 75 73 74 20 73 74  |entation must st|
00001c00  61 74 65 20 74 68 61 74  20 22 74 68 69 73 20 73  |ate that "this s|
00001c10  6f 66 74 77 61 72 65 20  69 73 20 62 61 73 65 64  |oftware is based|
00001c20  20 69 6e 20 70 61 72 74  20 6f 6e 20 74 68 65 20  | in part on the |
00001c30  77 6f 72 6b 20 6f 66 0a  74 68 65 20 49 6e 64 65  |work of.the Inde|
00001c40  70 65 6e 64 65 6e 74 20  4a 50 45 47 20 47 72 6f  |pendent JPEG Gro|
00001c50  75 70 22 2e 0a 28 33 29  20 50 65 72 6d 69 73 73  |up"..(3) Permiss|
00001c60  69 6f 6e 20 66 6f 72 20  75 73 65 20 6f 66 20 74  |ion for use of t|
00001c70  68 69 73 20 73 6f 66 74  77 61 72 65 20 69 73 20  |his software is |
00001c80  67 72 61 6e 74 65 64 20  6f 6e 6c 79 20 69 66 20  |granted only if |
00001c90  74 68 65 20 75 73 65 72  20 61 63 63 65 70 74 73  |the user accepts|
00001ca0  0a 66 75 6c 6c 20 72 65  73 70 6f 6e 73 69 62 69  |.full responsibi|
00001cb0  6c 69 74 79 20 66 6f 72  20 61 6e 79 20 75 6e 64  |lity for any und|
00001cc0  65 73 69 72 61 62 6c 65  20 63 6f 6e 73 65 71 75  |esirable consequ|
00001cd0  65 6e 63 65 73 3b 20 74  68 65 20 61 75 74 68 6f  |ences; the autho|
00001ce0  72 73 20 61 63 63 65 70  74 0a 4e 4f 20 4c 49 41  |rs accept.NO LIA|
00001cf0  42 49 4c 49 54 59 20 66  6f 72 20 64 61 6d 61 67  |BILITY for damag|
00001d00  65 73 20 6f 66 20 61 6e  79 20 6b 69 6e 64 2e 0a  |es of any kind..|
00001d10  0a 54 68 65 73 65 20 63  6f 6e 64 69 74 69 6f 6e  |.These condition|
00001d20  73 20 61 70 70 6c 79 20  74 6f 20 61 6e 79 20 73  |s apply to any s|
00001d30  6f 66 74 77 61 72 65 20  64 65 72 69 76 65 64 20  |oftware derived |
00001d40  66 72 6f 6d 20 6f 72 20  62 61 73 65 64 20 6f 6e  |from or based on|
00001d50  20 74 68 65 20 49 4a 47  20 63 6f 64 65 2c 0a 6e  | the IJG code,.n|
00001d60  6f 74 20 6a 75 73 74 20  74 6f 20 74 68 65 20 75  |ot just to the u|
00001d70  6e 6d 6f 64 69 66 69 65  64 20 6c 69 62 72 61 72  |nmodified librar|
00001d80  79 2e 20 20 49 66 20 79  6f 75 20 75 73 65 20 6f  |y.  If you use o|
00001d90  75 72 20 77 6f 72 6b 2c  20 79 6f 75 20 6f 75 67  |ur work, you oug|
00001da0  68 74 20 74 6f 0a 61 63  6b 6e 6f 77 6c 65 64 67  |ht to.acknowledg|
00001db0  65 20 75 73 2e 0a 0a 50  65 72 6d 69 73 73 69 6f  |e us...Permissio|
00001dc0  6e 20 69 73 20 4e 4f 54  20 67 72 61 6e 74 65 64  |n is NOT granted|
00001dd0  20 66 6f 72 20 74 68 65  20 75 73 65 20 6f 66 20  | for the use of |
00001de0  61 6e 79 20 49 4a 47 20  61 75 74 68 6f 72 27 73  |any IJG author's|
00001df0  20 6e 61 6d 65 20 6f 72  20 63 6f 6d 70 61 6e 79  | name or company|
00001e00  20 6e 61 6d 65 0a 69 6e  20 61 64 76 65 72 74 69  | name.in adverti|
00001e10  73 69 6e 67 20 6f 72 20  70 75 62 6c 69 63 69 74  |sing or publicit|
00001e20  79 20 72 65 6c 61 74 69  6e 67 20 74 6f 20 74 68  |y relating to th|
00001e30  69 73 20 73 6f 66 74 77  61 72 65 20 6f 72 20 70  |is software or p|
00001e40  72 6f 64 75 63 74 73 20  64 65 72 69 76 65 64 20  |roducts derived |
00001e50  66 72 6f 6d 0a 69 74 2e  20 20 54 68 69 73 20 73  |from.it.  This s|
00001e60  6f 66 74 77 61 72 65 20  6d 61 79 20 62 65 20 72  |oftware may be r|
00001e70  65 66 65 72 72 65 64 20  74 6f 20 6f 6e 6c 79 20  |eferred to only |
00001e80  61 73 20 22 74 68 65 20  49 6e 64 65 70 65 6e 64  |as "the Independ|
00001e90  65 6e 74 20 4a 50 45 47  20 47 72 6f 75 70 27 73  |ent JPEG Group's|
00001ea0  0a 73 6f 66 74 77 61 72  65 22 2e 0a 0a 57 65 20  |.software"...We |
00001eb0  73 70 65 63 69 66 69 63  61 6c 6c 79 20 70 65 72  |specifically per|
00001ec0  6d 69 74 20 61 6e 64 20  65 6e 63 6f 75 72 61 67  |mit and encourag|
00001ed0  65 20 74 68 65 20 75 73  65 20 6f 66 20 74 68 69  |e the use of thi|
00001ee0  73 20 73 6f 66 74 77 61  72 65 20 61 73 20 74 68  |s software as th|
00001ef0  65 20 62 61 73 69 73 20  6f 66 0a 63 6f 6d 6d 65  |e basis of.comme|
00001f00  72 63 69 61 6c 20 70 72  6f 64 75 63 74 73 2c 20  |rcial products, |
00001f10  70 72 6f 76 69 64 65 64  20 74 68 61 74 20 61 6c  |provided that al|
00001f20  6c 20 77 61 72 72 61 6e  74 79 20 6f 72 20 6c 69  |l warranty or li|
00001f30  61 62 69 6c 69 74 79 20  63 6c 61 69 6d 73 20 61  |ability claims a|
00001f40  72 65 0a 61 73 73 75 6d  65 64 20 62 79 20 74 68  |re.assumed by th|
00001f50  65 20 70 72 6f 64 75 63  74 20 76 65 6e 64 6f 72  |e product vendor|
00001f60  2e 0a 0a 0a 61 6e 73 69  32 6b 6e 72 2e 63 20 69  |....ansi2knr.c i|
00001f70  73 20 69 6e 63 6c 75 64  65 64 20 69 6e 20 74 68  |s included in th|
00001f80  69 73 20 64 69 73 74 72  69 62 75 74 69 6f 6e 20  |is distribution |
00001f90  62 79 20 70 65 72 6d 69  73 73 69 6f 6e 20 6f 66  |by permission of|
00001fa0  20 4c 2e 20 50 65 74 65  72 20 44 65 75 74 73 63  | L. Peter Deutsc|
00001fb0  68 2c 0a 73 6f 6c 65 20  70 72 6f 70 72 69 65 74  |h,.sole propriet|
00001fc0  6f 72 20 6f 66 20 69 74  73 20 63 6f 70 79 72 69  |or of its copyri|
00001fd0  67 68 74 20 68 6f 6c 64  65 72 2c 20 41 6c 61 64  |ght holder, Alad|
00001fe0  64 69 6e 20 45 6e 74 65  72 70 72 69 73 65 73 20  |din Enterprises |
00001ff0  6f 66 20 4d 65 6e 6c 6f  20 50 61 72 6b 2c 20 43  |of Menlo Park, C|
00002000  41 2e 0a 61 6e 73 69 32  6b 6e 72 2e 63 20 69 73  |A..ansi2knr.c is|
00002010  20 4e 4f 54 20 63 6f 76  65 72 65 64 20 62 79 20  | NOT covered by |
00002020  74 68 65 20 61 62 6f 76  65 20 63 6f 70 79 72 69  |the above copyri|
00002030  67 68 74 20 61 6e 64 20  63 6f 6e 64 69 74 69 6f  |ght and conditio|
00002040  6e 73 2c 20 62 75 74 20  69 6e 73 74 65 61 64 0a  |ns, but instead.|
00002050  62 79 20 74 68 65 20 75  73 75 61 6c 20 64 69 73  |by the usual dis|
00002060  74 72 69 62 75 74 69 6f  6e 20 74 65 72 6d 73 20  |tribution terms |
00002070  6f 66 20 74 68 65 20 46  72 65 65 20 53 6f 66 74  |of the Free Soft|
00002080  77 61 72 65 20 46 6f 75  6e 64 61 74 69 6f 6e 3b  |ware Foundation;|
00002090  20 70 72 69 6e 63 69 70  61 6c 6c 79 2c 0a 74 68  | principally,.th|
000020a0  61 74 20 79 6f 75 20 6d  75 73 74 20 69 6e 63 6c  |at you must incl|
000020b0  75 64 65 20 73 6f 75 72  63 65 20 63 6f 64 65 20  |ude source code |
000020c0  69 66 20 79 6f 75 20 72  65 64 69 73 74 72 69 62  |if you redistrib|
000020d0  75 74 65 20 69 74 2e 20  20 28 53 65 65 20 74 68  |ute it.  (See th|
000020e0  65 20 66 69 6c 65 0a 61  6e 73 69 32 6b 6e 72 2e  |e file.ansi2knr.|
000020f0  63 20 66 6f 72 20 66 75  6c 6c 20 64 65 74 61 69  |c for full detai|
00002100  6c 73 2e 29 20 20 48 6f  77 65 76 65 72 2c 20 73  |ls.)  However, s|
00002110  69 6e 63 65 20 61 6e 73  69 32 6b 6e 72 2e 63 20  |ince ansi2knr.c |
00002120  69 73 20 6e 6f 74 20 6e  65 65 64 65 64 20 61 73  |is not needed as|
00002130  20 70 61 72 74 0a 6f 66  20 61 6e 79 20 70 72 6f  | part.of any pro|
00002140  67 72 61 6d 20 67 65 6e  65 72 61 74 65 64 20 66  |gram generated f|
00002150  72 6f 6d 20 74 68 65 20  49 4a 47 20 63 6f 64 65  |rom the IJG code|
00002160  2c 20 74 68 69 73 20 64  6f 65 73 20 6e 6f 74 20  |, this does not |
00002170  6c 69 6d 69 74 20 79 6f  75 20 6d 6f 72 65 20 74  |limit you more t|
00002180  68 61 6e 0a 74 68 65 20  66 6f 72 65 67 6f 69 6e  |han.the foregoin|
00002190  67 20 70 61 72 61 67 72  61 70 68 73 20 64 6f 2e  |g paragraphs do.|
000021a0  0a 0a 54 68 65 20 63 6f  6e 66 69 67 75 72 61 74  |..The configurat|
000021b0  69 6f 6e 20 73 63 72 69  70 74 20 22 63 6f 6e 66  |ion script "conf|
000021c0  69 67 75 72 65 22 20 77  61 73 20 70 72 6f 64 75  |igure" was produ|
000021d0  63 65 64 20 77 69 74 68  20 47 4e 55 20 41 75 74  |ced with GNU Aut|
000021e0  6f 63 6f 6e 66 2e 20 20  49 74 0a 69 73 20 63 6f  |oconf.  It.is co|
000021f0  70 79 72 69 67 68 74 20  62 79 20 74 68 65 20 46  |pyright by the F|
00002200  72 65 65 20 53 6f 66 74  77 61 72 65 20 46 6f 75  |ree Software Fou|
00002210  6e 64 61 74 69 6f 6e 20  62 75 74 20 69 73 20 66  |ndation but is f|
00002220  72 65 65 6c 79 20 64 69  73 74 72 69 62 75 74 61  |reely distributa|
00002230  62 6c 65 2e 0a 0a 49 74  20 61 70 70 65 61 72 73  |ble...It appears|
00002240  20 74 68 61 74 20 74 68  65 20 61 72 69 74 68 6d  | that the arithm|
00002250  65 74 69 63 20 63 6f 64  69 6e 67 20 6f 70 74 69  |etic coding opti|
00002260  6f 6e 20 6f 66 20 74 68  65 20 4a 50 45 47 20 73  |on of the JPEG s|
00002270  70 65 63 20 69 73 20 63  6f 76 65 72 65 64 20 62  |pec is covered b|
00002280  79 0a 70 61 74 65 6e 74  73 20 6f 77 6e 65 64 20  |y.patents owned |
00002290  62 79 20 49 42 4d 2c 20  41 54 26 54 2c 20 61 6e  |by IBM, AT&T, an|
000022a0  64 20 4d 69 74 73 75 62  69 73 68 69 2e 20 20 48  |d Mitsubishi.  H|
000022b0  65 6e 63 65 20 61 72 69  74 68 6d 65 74 69 63 20  |ence arithmetic |
000022c0  63 6f 64 69 6e 67 20 63  61 6e 6e 6f 74 0a 6c 65  |coding cannot.le|
000022d0  67 61 6c 6c 79 20 62 65  20 75 73 65 64 20 77 69  |gally be used wi|
000022e0  74 68 6f 75 74 20 6f 62  74 61 69 6e 69 6e 67 20  |thout obtaining |
000022f0  6f 6e 65 20 6f 72 20 6d  6f 72 65 20 6c 69 63 65  |one or more lice|
00002300  6e 73 65 73 2e 20 20 46  6f 72 20 74 68 69 73 20  |nses.  For this |
00002310  72 65 61 73 6f 6e 2c 0a  73 75 70 70 6f 72 74 20  |reason,.support |
00002320  66 6f 72 20 61 72 69 74  68 6d 65 74 69 63 20 63  |for arithmetic c|
00002330  6f 64 69 6e 67 20 68 61  73 20 62 65 65 6e 20 72  |oding has been r|
00002340  65 6d 6f 76 65 64 20 66  72 6f 6d 20 74 68 65 20  |emoved from the |
00002350  66 72 65 65 20 4a 50 45  47 20 73 6f 66 74 77 61  |free JPEG softwa|
00002360  72 65 2e 0a 28 53 69 6e  63 65 20 61 72 69 74 68  |re..(Since arith|
00002370  6d 65 74 69 63 20 63 6f  64 69 6e 67 20 70 72 6f  |metic coding pro|
00002380  76 69 64 65 73 20 6f 6e  6c 79 20 61 20 6d 61 72  |vides only a mar|
00002390  67 69 6e 61 6c 20 67 61  69 6e 20 6f 76 65 72 20  |ginal gain over |
000023a0  74 68 65 20 75 6e 70 61  74 65 6e 74 65 64 0a 48  |the unpatented.H|
000023b0  75 66 66 6d 61 6e 20 6d  6f 64 65 2c 20 69 74 20  |uffman mode, it |
000023c0  69 73 20 75 6e 6c 69 6b  65 6c 79 20 74 68 61 74  |is unlikely that|
000023d0  20 76 65 72 79 20 6d 61  6e 79 20 69 6d 70 6c 65  | very many imple|
000023e0  6d 65 6e 74 61 74 69 6f  6e 73 20 77 69 6c 6c 20  |mentations will |
000023f0  73 75 70 70 6f 72 74 20  69 74 2e 29 0a 53 6f 20  |support it.).So |
00002400  66 61 72 20 61 73 20 77  65 20 61 72 65 20 61 77  |far as we are aw|
00002410  61 72 65 2c 20 74 68 65  72 65 20 61 72 65 20 6e  |are, there are n|
00002420  6f 20 70 61 74 65 6e 74  20 72 65 73 74 72 69 63  |o patent restric|
00002430  74 69 6f 6e 73 20 6f 6e  20 74 68 65 20 72 65 6d  |tions on the rem|
00002440  61 69 6e 69 6e 67 0a 63  6f 64 65 2e 0a 0a 57 41  |aining.code...WA|
00002450  52 4e 49 4e 47 3a 20 55  6e 69 73 79 73 20 68 61  |RNING: Unisys ha|
00002460  73 20 62 65 67 75 6e 20  74 6f 20 65 6e 66 6f 72  |s begun to enfor|
00002470  63 65 20 74 68 65 69 72  20 70 61 74 65 6e 74 20  |ce their patent |
00002480  6f 6e 20 4c 5a 57 20 63  6f 6d 70 72 65 73 73 69  |on LZW compressi|
00002490  6f 6e 20 61 67 61 69 6e  73 74 0a 47 49 46 20 65  |on against.GIF e|
000024a0  6e 63 6f 64 65 72 73 20  61 6e 64 20 64 65 63 6f  |ncoders and deco|
000024b0  64 65 72 73 2e 20 20 59  6f 75 20 77 69 6c 6c 20  |ders.  You will |
000024c0  6e 65 65 64 20 61 20 6c  69 63 65 6e 73 65 20 66  |need a license f|
000024d0  72 6f 6d 20 55 6e 69 73  79 73 20 74 6f 20 75 73  |rom Unisys to us|
000024e0  65 20 74 68 65 0a 69 6e  63 6c 75 64 65 64 20 72  |e the.included r|
000024f0  64 67 69 66 2e 63 20 6f  72 20 77 72 67 69 66 2e  |dgif.c or wrgif.|
00002500  63 20 66 69 6c 65 73 20  69 6e 20 61 20 63 6f 6d  |c files in a com|
00002510  6d 65 72 63 69 61 6c 20  6f 72 20 73 68 61 72 65  |mercial or share|
00002520  77 61 72 65 20 61 70 70  6c 69 63 61 74 69 6f 6e  |ware application|
00002530  2e 0a 41 74 20 74 68 69  73 20 74 69 6d 65 2c 20  |..At this time, |
00002540  55 6e 69 73 79 73 20 69  73 20 6e 6f 74 20 65 6e  |Unisys is not en|
00002550  66 6f 72 63 69 6e 67 20  74 68 65 69 72 20 70 61  |forcing their pa|
00002560  74 65 6e 74 20 61 67 61  69 6e 73 74 20 66 72 65  |tent against fre|
00002570  65 77 61 72 65 2c 20 73  6f 0a 64 69 73 74 72 69  |eware, so.distri|
00002580  62 75 74 69 6f 6e 20 6f  66 20 74 68 69 73 20 70  |bution of this p|
00002590  61 63 6b 61 67 65 20 72  65 6d 61 69 6e 73 20 6c  |ackage remains l|
000025a0  65 67 61 6c 2e 20 20 48  6f 77 65 76 65 72 2c 20  |egal.  However, |
000025b0  77 65 20 69 6e 74 65 6e  64 20 74 6f 20 72 65 6d  |we intend to rem|
000025c0  6f 76 65 0a 47 49 46 20  73 75 70 70 6f 72 74 20  |ove.GIF support |
000025d0  66 72 6f 6d 20 74 68 65  20 49 4a 47 20 70 61 63  |from the IJG pac|
000025e0  6b 61 67 65 20 61 73 20  73 6f 6f 6e 20 61 73 20  |kage as soon as |
000025f0  61 20 73 75 69 74 61 62  6c 65 20 72 65 70 6c 61  |a suitable repla|
00002600  63 65 6d 65 6e 74 20 66  6f 72 6d 61 74 0a 62 65  |cement format.be|
00002610  63 6f 6d 65 73 20 72 65  61 73 6f 6e 61 62 6c 79  |comes reasonably|
00002620  20 70 6f 70 75 6c 61 72  2e 0a 0a 57 65 20 61 72  | popular...We ar|
00002630  65 20 72 65 71 75 69 72  65 64 20 74 6f 20 73 74  |e required to st|
00002640  61 74 65 20 74 68 61 74  0a 20 20 20 20 22 54 68  |ate that.    "Th|
00002650  65 20 47 72 61 70 68 69  63 73 20 49 6e 74 65 72  |e Graphics Inter|
00002660  63 68 61 6e 67 65 20 46  6f 72 6d 61 74 28 63 29  |change Format(c)|
00002670  20 69 73 20 74 68 65 20  43 6f 70 79 72 69 67 68  | is the Copyrigh|
00002680  74 20 70 72 6f 70 65 72  74 79 20 6f 66 0a 20 20  |t property of.  |
00002690  20 20 43 6f 6d 70 75 53  65 72 76 65 20 49 6e 63  |  CompuServe Inc|
000026a0  6f 72 70 6f 72 61 74 65  64 2e 20 20 47 49 46 28  |orporated.  GIF(|
000026b0  73 6d 29 20 69 73 20 61  20 53 65 72 76 69 63 65  |sm) is a Service|
000026c0  20 4d 61 72 6b 20 70 72  6f 70 65 72 74 79 20 6f  | Mark property o|
000026d0  66 0a 20 20 20 20 43 6f  6d 70 75 53 65 72 76 65  |f.    CompuServe|
000026e0  20 49 6e 63 6f 72 70 6f  72 61 74 65 64 2e 22 0a  | Incorporated.".|
000026f0  0a 0a 52 45 46 45 52 45  4e 43 45 53 0a 3d 3d 3d  |..REFERENCES.===|
00002700  3d 3d 3d 3d 3d 3d 3d 0a  0a 57 65 20 68 69 67 68  |=======..We high|
00002710  6c 79 20 72 65 63 6f 6d  6d 65 6e 64 20 72 65 61  |ly recommend rea|
00002720  64 69 6e 67 20 6f 6e 65  20 6f 72 20 6d 6f 72 65  |ding one or more|
00002730  20 6f 66 20 74 68 65 73  65 20 72 65 66 65 72 65  | of these refere|
00002740  6e 63 65 73 20 62 65 66  6f 72 65 20 74 72 79 69  |nces before tryi|
00002750  6e 67 20 74 6f 0a 75 6e  64 65 72 73 74 61 6e 64  |ng to.understand|
00002760  20 74 68 65 20 69 6e 6e  61 72 64 73 20 6f 66 20  | the innards of |
00002770  74 68 65 20 4a 50 45 47  20 73 6f 66 74 77 61 72  |the JPEG softwar|
00002780  65 2e 0a 0a 54 68 65 20  62 65 73 74 20 73 68 6f  |e...The best sho|
00002790  72 74 20 74 65 63 68 6e  69 63 61 6c 20 69 6e 74  |rt technical int|
000027a0  72 6f 64 75 63 74 69 6f  6e 20 74 6f 20 74 68 65  |roduction to the|
000027b0  20 4a 50 45 47 20 63 6f  6d 70 72 65 73 73 69 6f  | JPEG compressio|
000027c0  6e 20 61 6c 67 6f 72 69  74 68 6d 20 69 73 0a 20  |n algorithm is. |
000027d0  20 20 20 20 20 20 20 57  61 6c 6c 61 63 65 2c 20  |       Wallace, |
000027e0  47 72 65 67 6f 72 79 20  4b 2e 20 20 22 54 68 65  |Gregory K.  "The|
000027f0  20 4a 50 45 47 20 53 74  69 6c 6c 20 50 69 63 74  | JPEG Still Pict|
00002800  75 72 65 20 43 6f 6d 70  72 65 73 73 69 6f 6e 20  |ure Compression |
00002810  53 74 61 6e 64 61 72 64  22 2c 0a 20 20 20 20 20  |Standard",.     |
00002820  20 20 20 43 6f 6d 6d 75  6e 69 63 61 74 69 6f 6e  |   Communication|
00002830  73 20 6f 66 20 74 68 65  20 41 43 4d 2c 20 41 70  |s of the ACM, Ap|
00002840  72 69 6c 20 31 39 39 31  20 28 76 6f 6c 2e 20 33  |ril 1991 (vol. 3|
00002850  34 20 6e 6f 2e 20 34 29  2c 20 70 70 2e 20 33 30  |4 no. 4), pp. 30|
00002860  2d 34 34 2e 0a 28 41 64  6a 61 63 65 6e 74 20 61  |-44..(Adjacent a|
00002870  72 74 69 63 6c 65 73 20  69 6e 20 74 68 61 74 20  |rticles in that |
00002880  69 73 73 75 65 20 64 69  73 63 75 73 73 20 4d 50  |issue discuss MP|
00002890  45 47 20 6d 6f 74 69 6f  6e 20 70 69 63 74 75 72  |EG motion pictur|
000028a0  65 20 63 6f 6d 70 72 65  73 73 69 6f 6e 2c 0a 61  |e compression,.a|
000028b0  70 70 6c 69 63 61 74 69  6f 6e 73 20 6f 66 20 4a  |pplications of J|
000028c0  50 45 47 2c 20 61 6e 64  20 72 65 6c 61 74 65 64  |PEG, and related|
000028d0  20 74 6f 70 69 63 73 2e  29 20 20 49 66 20 79 6f  | topics.)  If yo|
000028e0  75 20 64 6f 6e 27 74 20  68 61 76 65 20 74 68 65  |u don't have the|
000028f0  20 43 41 43 4d 20 69 73  73 75 65 0a 68 61 6e 64  | CACM issue.hand|
00002900  79 2c 20 61 20 50 6f 73  74 53 63 72 69 70 74 20  |y, a PostScript |
00002910  66 69 6c 65 20 63 6f 6e  74 61 69 6e 69 6e 67 20  |file containing |
00002920  61 20 72 65 76 69 73 65  64 20 76 65 72 73 69 6f  |a revised versio|
00002930  6e 20 6f 66 20 57 61 6c  6c 61 63 65 27 73 20 61  |n of Wallace's a|
00002940  72 74 69 63 6c 65 0a 69  73 20 61 76 61 69 6c 61  |rticle.is availa|
00002950  62 6c 65 20 61 74 20 66  74 70 2e 75 75 2e 6e 65  |ble at ftp.uu.ne|
00002960  74 2c 20 67 72 61 70 68  69 63 73 2f 6a 70 65 67  |t, graphics/jpeg|
00002970  2f 77 61 6c 6c 61 63 65  2e 70 73 2e 67 7a 2e 20  |/wallace.ps.gz. |
00002980  20 54 68 65 20 66 69 6c  65 20 28 61 63 74 75 61  | The file (actua|
00002990  6c 6c 79 0a 61 20 70 72  65 70 72 69 6e 74 20 66  |lly.a preprint f|
000029a0  6f 72 20 61 6e 20 61 72  74 69 63 6c 65 20 74 68  |or an article th|
000029b0  61 74 20 61 70 70 65 61  72 65 64 20 69 6e 20 49  |at appeared in I|
000029c0  45 45 45 20 54 72 61 6e  73 2e 20 43 6f 6e 73 75  |EEE Trans. Consu|
000029d0  6d 65 72 20 45 6c 65 63  74 72 6f 6e 69 63 73 29  |mer Electronics)|
000029e0  0a 6f 6d 69 74 73 20 74  68 65 20 73 61 6d 70 6c  |.omits the sampl|
000029f0  65 20 69 6d 61 67 65 73  20 74 68 61 74 20 61 70  |e images that ap|
00002a00  70 65 61 72 65 64 20 69  6e 20 43 41 43 4d 2c 20  |peared in CACM, |
00002a10  62 75 74 20 69 74 20 69  6e 63 6c 75 64 65 73 20  |but it includes |
00002a20  63 6f 72 72 65 63 74 69  6f 6e 73 0a 61 6e 64 20  |corrections.and |
00002a30  73 6f 6d 65 20 61 64 64  65 64 20 6d 61 74 65 72  |some added mater|
00002a40  69 61 6c 2e 20 20 4e 6f  74 65 3a 20 74 68 65 20  |ial.  Note: the |
00002a50  57 61 6c 6c 61 63 65 20  61 72 74 69 63 6c 65 20  |Wallace article |
00002a60  69 73 20 63 6f 70 79 72  69 67 68 74 20 41 43 4d  |is copyright ACM|
00002a70  20 61 6e 64 0a 49 45 45  45 2c 20 61 6e 64 20 69  | and.IEEE, and i|
00002a80  74 20 6d 61 79 20 6e 6f  74 20 62 65 20 75 73 65  |t may not be use|
00002a90  64 20 66 6f 72 20 63 6f  6d 6d 65 72 63 69 61 6c  |d for commercial|
00002aa0  20 70 75 72 70 6f 73 65  73 2e 0a 0a 41 20 73 6f  | purposes...A so|
00002ab0  6d 65 77 68 61 74 20 6c  65 73 73 20 74 65 63 68  |mewhat less tech|
00002ac0  6e 69 63 61 6c 2c 20 6d  6f 72 65 20 6c 65 69 73  |nical, more leis|
00002ad0  75 72 65 6c 79 20 69 6e  74 72 6f 64 75 63 74 69  |urely introducti|
00002ae0  6f 6e 20 74 6f 20 4a 50  45 47 20 63 61 6e 20 62  |on to JPEG can b|
00002af0  65 20 66 6f 75 6e 64 20  69 6e 0a 22 54 68 65 20  |e found in."The |
00002b00  44 61 74 61 20 43 6f 6d  70 72 65 73 73 69 6f 6e  |Data Compression|
00002b10  20 42 6f 6f 6b 22 20 62  79 20 4d 61 72 6b 20 4e  | Book" by Mark N|
00002b20  65 6c 73 6f 6e 2c 20 70  75 62 6c 69 73 68 65 64  |elson, published|
00002b30  20 62 79 20 4d 26 54 20  42 6f 6f 6b 73 20 28 52  | by M&T Books (R|
00002b40  65 64 77 6f 6f 64 0a 43  69 74 79 2c 20 43 41 29  |edwood.City, CA)|
00002b50  2c 20 31 39 39 31 2c 20  49 53 42 4e 20 31 2d 35  |, 1991, ISBN 1-5|
00002b60  35 38 35 31 2d 32 31 36  2d 30 2e 20 20 54 68 69  |5851-216-0.  Thi|
00002b70  73 20 62 6f 6f 6b 20 70  72 6f 76 69 64 65 73 20  |s book provides |
00002b80  67 6f 6f 64 20 65 78 70  6c 61 6e 61 74 69 6f 6e  |good explanation|
00002b90  73 20 61 6e 64 0a 65 78  61 6d 70 6c 65 20 43 20  |s and.example C |
00002ba0  63 6f 64 65 20 66 6f 72  20 61 20 6d 75 6c 74 69  |code for a multi|
00002bb0  74 75 64 65 20 6f 66 20  63 6f 6d 70 72 65 73 73  |tude of compress|
00002bc0  69 6f 6e 20 6d 65 74 68  6f 64 73 20 69 6e 63 6c  |ion methods incl|
00002bd0  75 64 69 6e 67 20 4a 50  45 47 2e 20 20 49 74 20  |uding JPEG.  It |
00002be0  69 73 0a 61 6e 20 65 78  63 65 6c 6c 65 6e 74 20  |is.an excellent |
00002bf0  73 6f 75 72 63 65 20 69  66 20 79 6f 75 20 61 72  |source if you ar|
00002c00  65 20 63 6f 6d 66 6f 72  74 61 62 6c 65 20 72 65  |e comfortable re|
00002c10  61 64 69 6e 67 20 43 20  63 6f 64 65 20 62 75 74  |ading C code but|
00002c20  20 64 6f 6e 27 74 20 6b  6e 6f 77 20 6d 75 63 68  | don't know much|
00002c30  0a 61 62 6f 75 74 20 64  61 74 61 20 63 6f 6d 70  |.about data comp|
00002c40  72 65 73 73 69 6f 6e 20  69 6e 20 67 65 6e 65 72  |ression in gener|
00002c50  61 6c 2e 20 20 54 68 65  20 62 6f 6f 6b 27 73 20  |al.  The book's |
00002c60  4a 50 45 47 20 73 61 6d  70 6c 65 20 63 6f 64 65  |JPEG sample code|
00002c70  20 69 73 20 66 61 72 20  66 72 6f 6d 0a 69 6e 64  | is far from.ind|
00002c80  75 73 74 72 69 61 6c 2d  73 74 72 65 6e 67 74 68  |ustrial-strength|
00002c90  2c 20 62 75 74 20 77 68  65 6e 20 79 6f 75 20 61  |, but when you a|
00002ca0  72 65 20 72 65 61 64 79  20 74 6f 20 6c 6f 6f 6b  |re ready to look|
00002cb0  20 61 74 20 61 20 66 75  6c 6c 20 69 6d 70 6c 65  | at a full imple|
00002cc0  6d 65 6e 74 61 74 69 6f  6e 2c 0a 79 6f 75 27 76  |mentation,.you'v|
00002cd0  65 20 67 6f 74 20 6f 6e  65 20 68 65 72 65 2e 2e  |e got one here..|
00002ce0  2e 0a 0a 54 68 65 20 62  65 73 74 20 66 75 6c 6c  |...The best full|
00002cf0  20 64 65 73 63 72 69 70  74 69 6f 6e 20 6f 66 20  | description of |
00002d00  4a 50 45 47 20 69 73 20  74 68 65 20 74 65 78 74  |JPEG is the text|
00002d10  62 6f 6f 6b 20 22 4a 50  45 47 20 53 74 69 6c 6c  |book "JPEG Still|
00002d20  20 49 6d 61 67 65 20 44  61 74 61 0a 43 6f 6d 70  | Image Data.Comp|
00002d30  72 65 73 73 69 6f 6e 20  53 74 61 6e 64 61 72 64  |ression Standard|
00002d40  22 20 62 79 20 57 69 6c  6c 69 61 6d 20 42 2e 20  |" by William B. |
00002d50  50 65 6e 6e 65 62 61 6b  65 72 20 61 6e 64 20 4a  |Pennebaker and J|
00002d60  6f 61 6e 20 4c 2e 20 4d  69 74 63 68 65 6c 6c 2c  |oan L. Mitchell,|
00002d70  20 70 75 62 6c 69 73 68  65 64 0a 62 79 20 56 61  | published.by Va|
00002d80  6e 20 4e 6f 73 74 72 61  6e 64 20 52 65 69 6e 68  |n Nostrand Reinh|
00002d90  6f 6c 64 2c 20 31 39 39  33 2c 20 49 53 42 4e 20  |old, 1993, ISBN |
00002da0  30 2d 34 34 32 2d 30 31  32 37 32 2d 31 2e 20 20  |0-442-01272-1.  |
00002db0  50 72 69 63 65 20 55 53  24 35 39 2e 39 35 2c 20  |Price US$59.95, |
00002dc0  36 33 38 20 70 70 2e 0a  54 68 65 20 62 6f 6f 6b  |638 pp..The book|
00002dd0  20 69 6e 63 6c 75 64 65  73 20 74 68 65 20 63 6f  | includes the co|
00002de0  6d 70 6c 65 74 65 20 74  65 78 74 20 6f 66 20 74  |mplete text of t|
00002df0  68 65 20 49 53 4f 20 4a  50 45 47 20 73 74 61 6e  |he ISO JPEG stan|
00002e00  64 61 72 64 73 20 28 44  49 53 20 31 30 39 31 38  |dards (DIS 10918|
00002e10  2d 31 0a 61 6e 64 20 64  72 61 66 74 20 44 49 53  |-1.and draft DIS|
00002e20  20 31 30 39 31 38 2d 32  29 2e 20 20 54 68 69 73  | 10918-2).  This|
00002e30  20 69 73 20 62 79 20 66  61 72 20 74 68 65 20 6d  | is by far the m|
00002e40  6f 73 74 20 63 6f 6d 70  6c 65 74 65 20 65 78 70  |ost complete exp|
00002e50  6f 73 69 74 69 6f 6e 20  6f 66 20 4a 50 45 47 0a  |osition of JPEG.|
00002e60  69 6e 20 65 78 69 73 74  65 6e 63 65 2c 20 61 6e  |in existence, an|
00002e70  64 20 77 65 20 68 69 67  68 6c 79 20 72 65 63 6f  |d we highly reco|
00002e80  6d 6d 65 6e 64 20 69 74  2e 0a 0a 54 68 65 20 4a  |mmend it...The J|
00002e90  50 45 47 20 73 74 61 6e  64 61 72 64 20 69 74 73  |PEG standard its|
00002ea0  65 6c 66 20 69 73 20 6e  6f 74 20 61 76 61 69 6c  |elf is not avail|
00002eb0  61 62 6c 65 20 65 6c 65  63 74 72 6f 6e 69 63 61  |able electronica|
00002ec0  6c 6c 79 3b 20 79 6f 75  20 6d 75 73 74 20 6f 72  |lly; you must or|
00002ed0  64 65 72 20 61 0a 70 61  70 65 72 20 63 6f 70 79  |der a.paper copy|
00002ee0  20 74 68 72 6f 75 67 68  20 49 53 4f 2e 20 20 28  | through ISO.  (|
00002ef0  55 6e 6c 65 73 73 20 79  6f 75 20 66 65 65 6c 20  |Unless you feel |
00002f00  61 20 6e 65 65 64 20 74  6f 20 6f 77 6e 20 61 20  |a need to own a |
00002f10  63 65 72 74 69 66 69 65  64 20 6f 66 66 69 63 69  |certified offici|
00002f20  61 6c 0a 63 6f 70 79 2c  20 77 65 20 72 65 63 6f  |al.copy, we reco|
00002f30  6d 6d 65 6e 64 20 62 75  79 69 6e 67 20 74 68 65  |mmend buying the|
00002f40  20 50 65 6e 6e 65 62 61  6b 65 72 20 61 6e 64 20  | Pennebaker and |
00002f50  4d 69 74 63 68 65 6c 6c  20 62 6f 6f 6b 20 69 6e  |Mitchell book in|
00002f60  73 74 65 61 64 3b 20 69  74 27 73 20 6d 75 63 68  |stead; it's much|
00002f70  0a 63 68 65 61 70 65 72  20 61 6e 64 20 69 6e 63  |.cheaper and inc|
00002f80  6c 75 64 65 73 20 61 20  67 72 65 61 74 20 64 65  |ludes a great de|
00002f90  61 6c 20 6f 66 20 75 73  65 66 75 6c 20 65 78 70  |al of useful exp|
00002fa0  6c 61 6e 61 74 6f 72 79  20 6d 61 74 65 72 69 61  |lanatory materia|
00002fb0  6c 2e 29 20 20 49 6e 20  74 68 65 20 55 53 2c 0a  |l.)  In the US,.|
00002fc0  63 6f 70 69 65 73 20 6f  66 20 74 68 65 20 73 74  |copies of the st|
00002fd0  61 6e 64 61 72 64 20 6d  61 79 20 62 65 20 6f 72  |andard may be or|
00002fe0  64 65 72 65 64 20 66 72  6f 6d 20 41 4e 53 49 20  |dered from ANSI |
00002ff0  53 61 6c 65 73 20 61 74  20 28 32 31 32 29 20 36  |Sales at (212) 6|
00003000  34 32 2d 34 39 30 30 2c  20 6f 72 0a 66 72 6f 6d  |42-4900, or.from|
00003010  20 47 6c 6f 62 61 6c 20  45 6e 67 69 6e 65 65 72  | Global Engineer|
00003020  69 6e 67 20 44 6f 63 75  6d 65 6e 74 73 20 61 74  |ing Documents at|
00003030  20 28 38 30 30 29 20 38  35 34 2d 37 31 37 39 2e  | (800) 854-7179.|
00003040  20 20 28 41 4e 53 49 20  64 6f 65 73 6e 27 74 20  |  (ANSI doesn't |
00003050  74 61 6b 65 0a 63 72 65  64 69 74 20 63 61 72 64  |take.credit card|
00003060  20 6f 72 64 65 72 73 2c  20 62 75 74 20 47 6c 6f  | orders, but Glo|
00003070  62 61 6c 20 64 6f 65 73  2e 29 20 20 49 74 27 73  |bal does.)  It's|
00003080  20 6e 6f 74 20 63 68 65  61 70 3a 20 61 73 20 6f  | not cheap: as o|
00003090  66 20 31 39 39 32 2c 20  41 4e 53 49 20 77 61 73  |f 1992, ANSI was|
000030a0  0a 63 68 61 72 67 69 6e  67 20 24 39 35 20 66 6f  |.charging $95 fo|
000030b0  72 20 50 61 72 74 20 31  20 61 6e 64 20 24 34 37  |r Part 1 and $47|
000030c0  20 66 6f 72 20 50 61 72  74 20 32 2c 20 70 6c 75  | for Part 2, plu|
000030d0  73 20 37 25 20 73 68 69  70 70 69 6e 67 2f 68 61  |s 7% shipping/ha|
000030e0  6e 64 6c 69 6e 67 2e 20  20 54 68 65 0a 73 74 61  |ndling.  The.sta|
000030f0  6e 64 61 72 64 20 69 73  20 64 69 76 69 64 65 64  |ndard is divided|
00003100  20 69 6e 74 6f 20 74 77  6f 20 70 61 72 74 73 2c  | into two parts,|
00003110  20 50 61 72 74 20 31 20  62 65 69 6e 67 20 74 68  | Part 1 being th|
00003120  65 20 61 63 74 75 61 6c  20 73 70 65 63 69 66 69  |e actual specifi|
00003130  63 61 74 69 6f 6e 2c 0a  77 68 69 6c 65 20 50 61  |cation,.while Pa|
00003140  72 74 20 32 20 63 6f 76  65 72 73 20 63 6f 6d 70  |rt 2 covers comp|
00003150  6c 69 61 6e 63 65 20 74  65 73 74 69 6e 67 20 6d  |liance testing m|
00003160  65 74 68 6f 64 73 2e 20  20 50 61 72 74 20 31 20  |ethods.  Part 1 |
00003170  69 73 20 74 69 74 6c 65  64 20 22 44 69 67 69 74  |is titled "Digit|
00003180  61 6c 0a 43 6f 6d 70 72  65 73 73 69 6f 6e 20 61  |al.Compression a|
00003190  6e 64 20 43 6f 64 69 6e  67 20 6f 66 20 43 6f 6e  |nd Coding of Con|
000031a0  74 69 6e 75 6f 75 73 2d  74 6f 6e 65 20 53 74 69  |tinuous-tone Sti|
000031b0  6c 6c 20 49 6d 61 67 65  73 2c 20 50 61 72 74 20  |ll Images, Part |
000031c0  31 3a 20 52 65 71 75 69  72 65 6d 65 6e 74 73 0a  |1: Requirements.|
000031d0  61 6e 64 20 67 75 69 64  65 6c 69 6e 65 73 22 20  |and guidelines" |
000031e0  61 6e 64 20 68 61 73 20  64 6f 63 75 6d 65 6e 74  |and has document|
000031f0  20 6e 75 6d 62 65 72 20  49 53 4f 2f 49 45 43 20  | number ISO/IEC |
00003200  49 53 20 31 30 39 31 38  2d 31 2e 20 20 50 61 72  |IS 10918-1.  Par|
00003210  74 20 32 20 69 73 20 74  69 74 6c 65 64 0a 22 44  |t 2 is titled."D|
00003220  69 67 69 74 61 6c 20 43  6f 6d 70 72 65 73 73 69  |igital Compressi|
00003230  6f 6e 20 61 6e 64 20 43  6f 64 69 6e 67 20 6f 66  |on and Coding of|
00003240  20 43 6f 6e 74 69 6e 75  6f 75 73 2d 74 6f 6e 65  | Continuous-tone|
00003250  20 53 74 69 6c 6c 20 49  6d 61 67 65 73 2c 20 50  | Still Images, P|
00003260  61 72 74 20 32 3a 0a 43  6f 6d 70 6c 69 61 6e 63  |art 2:.Complianc|
00003270  65 20 74 65 73 74 69 6e  67 22 20 61 6e 64 20 68  |e testing" and h|
00003280  61 73 20 64 6f 63 75 6d  65 6e 74 20 6e 75 6d 62  |as document numb|
00003290  65 72 20 49 53 4f 2f 49  45 43 20 49 53 20 31 30  |er ISO/IEC IS 10|
000032a0  39 31 38 2d 32 2e 0a 0a  45 78 74 65 6e 73 69 6f  |918-2...Extensio|
000032b0  6e 73 20 74 6f 20 74 68  65 20 6f 72 69 67 69 6e  |ns to the origin|
000032c0  61 6c 20 4a 50 45 47 20  73 74 61 6e 64 61 72 64  |al JPEG standard|
000032d0  20 61 72 65 20 64 65 66  69 6e 65 64 20 69 6e 20  | are defined in |
000032e0  50 61 72 74 20 33 2c 20  61 20 6e 65 77 20 49 53  |Part 3, a new IS|
000032f0  4f 0a 64 6f 63 75 6d 65  6e 74 2e 20 20 50 61 72  |O.document.  Par|
00003300  74 20 33 20 69 73 20 75  6e 64 65 72 67 6f 69 6e  |t 3 is undergoin|
00003310  67 20 49 53 4f 20 62 61  6c 6c 6f 74 69 6e 67 20  |g ISO balloting |
00003320  61 6e 64 20 69 73 20 65  78 70 65 63 74 65 64 20  |and is expected |
00003330  74 6f 20 62 65 20 61 70  70 72 6f 76 65 64 0a 62  |to be approved.b|
00003340  79 20 74 68 65 20 65 6e  64 20 6f 66 20 31 39 39  |y the end of 199|
00003350  35 2e 20 20 49 4a 47 20  63 75 72 72 65 6e 74 6c  |5.  IJG currentl|
00003360  79 20 64 6f 65 73 20 6e  6f 74 20 73 75 70 70 6f  |y does not suppo|
00003370  72 74 20 61 6e 79 20 50  61 72 74 20 33 20 65 78  |rt any Part 3 ex|
00003380  74 65 6e 73 69 6f 6e 73  2e 0a 0a 54 68 65 20 4a  |tensions...The J|
00003390  50 45 47 20 73 74 61 6e  64 61 72 64 20 64 6f 65  |PEG standard doe|
000033a0  73 20 6e 6f 74 20 73 70  65 63 69 66 79 20 61 6c  |s not specify al|
000033b0  6c 20 64 65 74 61 69 6c  73 20 6f 66 20 61 6e 20  |l details of an |
000033c0  69 6e 74 65 72 63 68 61  6e 67 65 61 62 6c 65 20  |interchangeable |
000033d0  66 69 6c 65 0a 66 6f 72  6d 61 74 2e 20 20 46 6f  |file.format.  Fo|
000033e0  72 20 74 68 65 20 6f 6d  69 74 74 65 64 20 64 65  |r the omitted de|
000033f0  74 61 69 6c 73 20 77 65  20 66 6f 6c 6c 6f 77 20  |tails we follow |
00003400  74 68 65 20 22 4a 46 49  46 22 20 63 6f 6e 76 65  |the "JFIF" conve|
00003410  6e 74 69 6f 6e 73 2c 20  72 65 76 69 73 69 6f 6e  |ntions, revision|
00003420  0a 31 2e 30 32 2e 20 20  41 20 63 6f 70 79 20 6f  |.1.02.  A copy o|
00003430  66 20 74 68 65 20 4a 46  49 46 20 73 70 65 63 20  |f the JFIF spec |
00003440  69 73 20 61 76 61 69 6c  61 62 6c 65 20 66 72 6f  |is available fro|
00003450  6d 3a 0a 20 20 20 20 20  20 20 20 4c 69 74 65 72  |m:.        Liter|
00003460  61 74 75 72 65 20 44 65  70 61 72 74 6d 65 6e 74  |ature Department|
00003470  0a 20 20 20 20 20 20 20  20 43 2d 43 75 62 65 20  |.        C-Cube |
00003480  4d 69 63 72 6f 73 79 73  74 65 6d 73 2c 20 49 6e  |Microsystems, In|
00003490  63 2e 0a 20 20 20 20 20  20 20 20 31 37 37 38 20  |c..        1778 |
000034a0  4d 63 43 61 72 74 68 79  20 42 6c 76 64 2e 0a 20  |McCarthy Blvd.. |
000034b0  20 20 20 20 20 20 20 4d  69 6c 70 69 74 61 73 2c  |       Milpitas,|
000034c0  20 43 41 20 39 35 30 33  35 0a 20 20 20 20 20 20  | CA 95035.      |
000034d0  20 20 70 68 6f 6e 65 20  28 34 30 38 29 20 39 34  |  phone (408) 94|
000034e0  34 2d 36 33 30 30 2c 20  20 66 61 78 20 28 34 30  |4-6300,  fax (40|
000034f0  38 29 20 39 34 34 2d 36  33 31 34 0a 41 20 50 6f  |8) 944-6314.A Po|
00003500  73 74 53 63 72 69 70 74  20 76 65 72 73 69 6f 6e  |stScript version|
00003510  20 6f 66 20 74 68 69 73  20 64 6f 63 75 6d 65 6e  | of this documen|
00003520  74 20 69 73 20 61 76 61  69 6c 61 62 6c 65 20 61  |t is available a|
00003530  74 20 66 74 70 2e 75 75  2e 6e 65 74 2c 20 66 69  |t ftp.uu.net, fi|
00003540  6c 65 0a 67 72 61 70 68  69 63 73 2f 6a 70 65 67  |le.graphics/jpeg|
00003550  2f 6a 66 69 66 2e 70 73  2e 67 7a 2e 20 20 49 74  |/jfif.ps.gz.  It|
00003560  20 63 61 6e 20 61 6c 73  6f 20 62 65 20 6f 62 74  | can also be obt|
00003570  61 69 6e 65 64 20 62 79  20 65 2d 6d 61 69 6c 20  |ained by e-mail |
00003580  66 72 6f 6d 20 74 68 65  20 43 2d 43 75 62 65 0a  |from the C-Cube.|
00003590  6d 61 69 6c 20 73 65 72  76 65 72 2c 20 6e 65 74  |mail server, net|
000035a0  6c 69 62 40 63 33 2e 70  6c 61 2e 63 61 2e 75 73  |lib@c3.pla.ca.us|
000035b0  2e 20 20 53 65 6e 64 20  74 68 65 20 6d 65 73 73  |.  Send the mess|
000035c0  61 67 65 20 22 73 65 6e  64 20 6a 66 69 66 5f 70  |age "send jfif_p|
000035d0  73 20 66 72 6f 6d 20 6a  70 65 67 22 0a 74 6f 20  |s from jpeg".to |
000035e0  74 68 65 20 73 65 72 76  65 72 20 74 6f 20 6f 62  |the server to ob|
000035f0  74 61 69 6e 20 74 68 65  20 4a 46 49 46 20 64 6f  |tain the JFIF do|
00003600  63 75 6d 65 6e 74 3b 20  73 65 6e 64 20 74 68 65  |cument; send the|
00003610  20 6d 65 73 73 61 67 65  20 22 68 65 6c 70 22 20  | message "help" |
00003620  69 66 20 79 6f 75 20 68  61 76 65 0a 74 72 6f 75  |if you have.trou|
00003630  62 6c 65 2e 0a 0a 54 68  65 20 54 49 46 46 20 36  |ble...The TIFF 6|
00003640  2e 30 20 66 69 6c 65 20  66 6f 72 6d 61 74 20 73  |.0 file format s|
00003650  70 65 63 69 66 69 63 61  74 69 6f 6e 20 63 61 6e  |pecification can|
00003660  20 62 65 20 6f 62 74 61  69 6e 65 64 20 62 79 20  | be obtained by |
00003670  46 54 50 20 66 72 6f 6d  20 73 67 69 2e 63 6f 6d  |FTP from sgi.com|
00003680  0a 28 31 39 32 2e 34 38  2e 31 35 33 2e 31 29 2c  |.(192.48.153.1),|
00003690  20 66 69 6c 65 20 67 72  61 70 68 69 63 73 2f 74  | file graphics/t|
000036a0  69 66 66 2f 54 49 46 46  36 2e 70 73 2e 5a 3b 20  |iff/TIFF6.ps.Z; |
000036b0  6f 72 20 79 6f 75 20 63  61 6e 20 6f 72 64 65 72  |or you can order|
000036c0  20 61 20 70 72 69 6e 74  65 64 0a 63 6f 70 79 20  | a printed.copy |
000036d0  66 72 6f 6d 20 41 6c 64  75 73 20 43 6f 72 70 2e  |from Aldus Corp.|
000036e0  20 61 74 20 28 32 30 36  29 20 36 32 38 2d 36 35  | at (206) 628-65|
000036f0  39 33 2e 20 20 54 68 65  20 4a 50 45 47 20 69 6e  |93.  The JPEG in|
00003700  63 6f 72 70 6f 72 61 74  69 6f 6e 20 73 63 68 65  |corporation sche|
00003710  6d 65 0a 66 6f 75 6e 64  20 69 6e 20 74 68 65 20  |me.found in the |
00003720  54 49 46 46 20 36 2e 30  20 73 70 65 63 20 6f 66  |TIFF 6.0 spec of|
00003730  20 33 2d 4a 75 6e 65 2d  39 32 20 68 61 73 20 61  | 3-June-92 has a|
00003740  20 6e 75 6d 62 65 72 20  6f 66 20 73 65 72 69 6f  | number of serio|
00003750  75 73 20 70 72 6f 62 6c  65 6d 73 2e 0a 49 4a 47  |us problems..IJG|
00003760  20 64 6f 65 73 20 6e 6f  74 20 72 65 63 6f 6d 6d  | does not recomm|
00003770  65 6e 64 20 75 73 65 20  6f 66 20 74 68 65 20 54  |end use of the T|
00003780  49 46 46 20 36 2e 30 20  64 65 73 69 67 6e 20 28  |IFF 6.0 design (|
00003790  54 49 46 46 20 43 6f 6d  70 72 65 73 73 69 6f 6e  |TIFF Compression|
000037a0  20 74 61 67 20 36 29 2e  0a 49 6e 73 74 65 61 64  | tag 6)..Instead|
000037b0  2c 20 77 65 20 72 65 63  6f 6d 6d 65 6e 64 20 74  |, we recommend t|
000037c0  68 65 20 4a 50 45 47 20  64 65 73 69 67 6e 20 70  |he JPEG design p|
000037d0  72 6f 70 6f 73 65 64 20  62 79 20 54 49 46 46 20  |roposed by TIFF |
000037e0  54 65 63 68 6e 69 63 61  6c 20 4e 6f 74 65 20 23  |Technical Note #|
000037f0  32 0a 28 43 6f 6d 70 72  65 73 73 69 6f 6e 20 74  |2.(Compression t|
00003800  61 67 20 37 29 2e 20 20  43 6f 70 69 65 73 20 6f  |ag 7).  Copies o|
00003810  66 20 74 68 69 73 20 4e  6f 74 65 20 63 61 6e 20  |f this Note can |
00003820  62 65 20 6f 62 74 61 69  6e 65 64 20 66 72 6f 6d  |be obtained from|
00003830  20 73 67 69 2e 63 6f 6d  20 6f 72 0a 66 72 6f 6d  | sgi.com or.from|
00003840  20 66 74 70 2e 75 75 2e  6e 65 74 3a 2f 67 72 61  | ftp.uu.net:/gra|
00003850  70 68 69 63 73 2f 6a 70  65 67 2f 2e 20 20 49 74  |phics/jpeg/.  It|
00003860  20 69 73 20 65 78 70 65  63 74 65 64 20 74 68 61  | is expected tha|
00003870  74 20 74 68 65 20 6e 65  78 74 20 72 65 76 69 73  |t the next revis|
00003880  69 6f 6e 20 6f 66 0a 74  68 65 20 54 49 46 46 20  |ion of.the TIFF |
00003890  73 70 65 63 20 77 69 6c  6c 20 72 65 70 6c 61 63  |spec will replac|
000038a0  65 20 74 68 65 20 36 2e  30 20 4a 50 45 47 20 64  |e the 6.0 JPEG d|
000038b0  65 73 69 67 6e 20 77 69  74 68 20 74 68 65 20 4e  |esign with the N|
000038c0  6f 74 65 27 73 20 64 65  73 69 67 6e 2e 0a 41 6c  |ote's design..Al|
000038d0  74 68 6f 75 67 68 20 49  4a 47 27 73 20 6f 77 6e  |though IJG's own|
000038e0  20 63 6f 64 65 20 64 6f  65 73 20 6e 6f 74 20 73  | code does not s|
000038f0  75 70 70 6f 72 74 20 54  49 46 46 2f 4a 50 45 47  |upport TIFF/JPEG|
00003900  2c 20 74 68 65 20 66 72  65 65 20 6c 69 62 74 69  |, the free libti|
00003910  66 66 20 6c 69 62 72 61  72 79 0a 75 73 65 73 20  |ff library.uses |
00003920  6f 75 72 20 6c 69 62 72  61 72 79 20 74 6f 20 69  |our library to i|
00003930  6d 70 6c 65 6d 65 6e 74  20 54 49 46 46 2f 4a 50  |mplement TIFF/JP|
00003940  45 47 20 70 65 72 20 74  68 65 20 4e 6f 74 65 2e  |EG per the Note.|
00003950  20 20 6c 69 62 74 69 66  66 20 69 73 20 61 76 61  |  libtiff is ava|
00003960  69 6c 61 62 6c 65 0a 66  72 6f 6d 20 73 67 69 2e  |ilable.from sgi.|
00003970  63 6f 6d 3a 2f 67 72 61  70 68 69 63 73 2f 74 69  |com:/graphics/ti|
00003980  66 66 2f 2e 0a 0a 0a 41  52 43 48 49 56 45 20 4c  |ff/....ARCHIVE L|
00003990  4f 43 41 54 49 4f 4e 53  0a 3d 3d 3d 3d 3d 3d 3d  |OCATIONS.=======|
000039a0  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 0a 0a 54 68 65 20  |==========..The |
000039b0  22 6f 66 66 69 63 69 61  6c 22 20 61 72 63 68 69  |"official" archi|
000039c0  76 65 20 73 69 74 65 20  66 6f 72 20 74 68 69 73  |ve site for this|
000039d0  20 73 6f 66 74 77 61 72  65 20 69 73 20 66 74 70  | software is ftp|
000039e0  2e 75 75 2e 6e 65 74 20  28 49 6e 74 65 72 6e 65  |.uu.net (Interne|
000039f0  74 0a 61 64 64 72 65 73  73 20 31 39 32 2e 34 38  |t.address 192.48|
00003a00  2e 39 36 2e 39 29 2e 20  20 54 68 65 20 6d 6f 73  |.96.9).  The mos|
00003a10  74 20 72 65 63 65 6e 74  20 72 65 6c 65 61 73 65  |t recent release|
00003a20  64 20 76 65 72 73 69 6f  6e 20 63 61 6e 20 61 6c  |d version can al|
00003a30  77 61 79 73 20 62 65 20  66 6f 75 6e 64 0a 74 68  |ways be found.th|
00003a40  65 72 65 20 69 6e 20 64  69 72 65 63 74 6f 72 79  |ere in directory|
00003a50  20 67 72 61 70 68 69 63  73 2f 6a 70 65 67 2e 20  | graphics/jpeg. |
00003a60  20 54 68 69 73 20 70 61  72 74 69 63 75 6c 61 72  | This particular|
00003a70  20 76 65 72 73 69 6f 6e  20 77 69 6c 6c 20 62 65  | version will be|
00003a80  20 61 72 63 68 69 76 65  64 0a 61 73 20 67 72 61  | archived.as gra|
00003a90  70 68 69 63 73 2f 6a 70  65 67 2f 6a 70 65 67 73  |phics/jpeg/jpegs|
00003aa0  72 63 2e 76 36 2e 74 61  72 2e 67 7a 2e 20 20 49  |rc.v6.tar.gz.  I|
00003ab0  66 20 79 6f 75 20 61 72  65 20 6f 6e 20 74 68 65  |f you are on the|
00003ac0  20 49 6e 74 65 72 6e 65  74 2c 20 79 6f 75 0a 63  | Internet, you.c|
00003ad0  61 6e 20 72 65 74 72 69  65 76 65 20 66 69 6c 65  |an retrieve file|
00003ae0  73 20 66 72 6f 6d 20 66  74 70 2e 75 75 2e 6e 65  |s from ftp.uu.ne|
00003af0  74 20 62 79 20 73 74 61  6e 64 61 72 64 20 61 6e  |t by standard an|
00003b00  6f 6e 79 6d 6f 75 73 20  46 54 50 2e 20 20 49 66  |onymous FTP.  If|
00003b10  20 79 6f 75 20 64 6f 6e  27 74 0a 68 61 76 65 20  | you don't.have |
00003b20  46 54 50 20 61 63 63 65  73 73 2c 20 55 55 4e 45  |FTP access, UUNE|
00003b30  54 27 73 20 61 72 63 68  69 76 65 73 20 61 72 65  |T's archives are|
00003b40  20 61 6c 73 6f 20 61 76  61 69 6c 61 62 6c 65 20  | also available |
00003b50  76 69 61 20 55 55 43 50  3b 20 63 6f 6e 74 61 63  |via UUCP; contac|
00003b60  74 0a 68 65 6c 70 40 75  75 6e 65 74 2e 75 75 2e  |t.help@uunet.uu.|
00003b70  6e 65 74 20 66 6f 72 20  69 6e 66 6f 72 6d 61 74  |net for informat|
00003b80  69 6f 6e 20 6f 6e 20 72  65 74 72 69 65 76 69 6e  |ion on retrievin|
00003b90  67 20 66 69 6c 65 73 20  74 68 61 74 20 77 61 79  |g files that way|
00003ba0  2e 0a 0a 4e 75 6d 65 72  6f 75 73 20 49 6e 74 65  |...Numerous Inte|
00003bb0  72 6e 65 74 20 73 69 74  65 73 20 6d 61 69 6e 74  |rnet sites maint|
00003bc0  61 69 6e 20 63 6f 70 69  65 73 20 6f 66 20 74 68  |ain copies of th|
00003bd0  65 20 55 55 4e 45 54 20  66 69 6c 65 73 3b 20 69  |e UUNET files; i|
00003be0  6e 20 70 61 72 74 69 63  75 6c 61 72 2c 0a 79 6f  |n particular,.yo|
00003bf0  75 20 63 61 6e 20 70 72  6f 62 61 62 6c 79 20 66  |u can probably f|
00003c00  69 6e 64 20 61 20 63 6f  70 79 20 61 74 20 61 6e  |ind a copy at an|
00003c10  79 20 73 69 74 65 20 74  68 61 74 20 61 72 63 68  |y site that arch|
00003c20  69 76 65 73 20 63 6f 6d  70 2e 73 6f 75 72 63 65  |ives comp.source|
00003c30  73 2e 6d 69 73 63 0a 73  75 62 6d 69 73 73 69 6f  |s.misc.submissio|
00003c40  6e 73 2e 20 20 48 6f 77  65 76 65 72 2c 20 6f 6e  |ns.  However, on|
00003c50  6c 79 20 66 74 70 2e 75  75 2e 6e 65 74 20 69 73  |ly ftp.uu.net is|
00003c60  20 67 75 61 72 61 6e 74  65 65 64 20 74 6f 20 68  | guaranteed to h|
00003c70  61 76 65 20 74 68 65 20  6c 61 74 65 73 74 0a 6f  |ave the latest.o|
00003c80  66 66 69 63 69 61 6c 20  76 65 72 73 69 6f 6e 2e  |fficial version.|
00003c90  0a 0a 59 6f 75 20 63 61  6e 20 61 6c 73 6f 20 6f  |..You can also o|
00003ca0  62 74 61 69 6e 20 74 68  69 73 20 73 6f 66 74 77  |btain this softw|
00003cb0  61 72 65 20 69 6e 20 44  4f 53 2d 63 6f 6d 70 61  |are in DOS-compa|
00003cc0  74 69 62 6c 65 20 22 7a  69 70 22 20 61 72 63 68  |tible "zip" arch|
00003cd0  69 76 65 20 66 6f 72 6d  61 74 20 66 72 6f 6d 0a  |ive format from.|
00003ce0  74 68 65 20 53 69 6d 54  65 6c 20 61 72 63 68 69  |the SimTel archi|
00003cf0  76 65 73 20 28 66 74 70  2e 63 6f 61 73 74 2e 6e  |ves (ftp.coast.n|
00003d00  65 74 3a 2f 53 69 6d 54  65 6c 2f 6d 73 64 6f 73  |et:/SimTel/msdos|
00003d10  2f 67 72 61 70 68 69 63  73 2f 29 2c 20 6f 72 20  |/graphics/), or |
00003d20  6f 6e 20 43 6f 6d 70 75  53 65 72 76 65 0a 69 6e  |on CompuServe.in|
00003d30  20 74 68 65 20 47 52 41  50 48 53 55 50 50 4f 52  | the GRAPHSUPPOR|
00003d40  54 20 66 6f 72 75 6d 20  28 47 4f 20 47 52 41 50  |T forum (GO GRAP|
00003d50  48 53 55 50 29 2c 20 6c  69 62 72 61 72 79 20 31  |HSUP), library 1|
00003d60  32 20 22 4a 50 45 47 20  54 6f 6f 6c 73 22 2e 20  |2 "JPEG Tools". |
00003d70  20 41 67 61 69 6e 2c 0a  74 68 65 73 65 20 76 65  | Again,.these ve|
00003d80  72 73 69 6f 6e 73 20 6d  61 79 20 73 6f 6d 65 74  |rsions may somet|
00003d90  69 6d 65 73 20 6c 61 67  20 62 65 68 69 6e 64 20  |imes lag behind |
00003da0  74 68 65 20 66 74 70 2e  75 75 2e 6e 65 74 20 72  |the ftp.uu.net r|
00003db0  65 6c 65 61 73 65 2e 0a  0a 54 68 65 20 4a 50 45  |elease...The JPE|
00003dc0  47 20 46 41 51 20 28 46  72 65 71 75 65 6e 74 6c  |G FAQ (Frequentl|
00003dd0  79 20 41 73 6b 65 64 20  51 75 65 73 74 69 6f 6e  |y Asked Question|
00003de0  73 29 20 61 72 74 69 63  6c 65 20 69 73 20 61 20  |s) article is a |
00003df0  75 73 65 66 75 6c 20 73  6f 75 72 63 65 20 6f 66  |useful source of|
00003e00  0a 67 65 6e 65 72 61 6c  20 69 6e 66 6f 72 6d 61  |.general informa|
00003e10  74 69 6f 6e 20 61 62 6f  75 74 20 4a 50 45 47 2e  |tion about JPEG.|
00003e20  20 20 49 74 20 69 73 20  75 70 64 61 74 65 64 20  |  It is updated |
00003e30  63 6f 6e 73 74 61 6e 74  6c 79 20 61 6e 64 20 74  |constantly and t|
00003e40  68 65 72 65 66 6f 72 65  20 69 73 0a 6e 6f 74 20  |herefore is.not |
00003e50  69 6e 63 6c 75 64 65 64  20 69 6e 20 74 68 69 73  |included in this|
00003e60  20 64 69 73 74 72 69 62  75 74 69 6f 6e 2e 20 20  | distribution.  |
00003e70  54 68 65 20 46 41 51 20  69 73 20 70 6f 73 74 65  |The FAQ is poste|
00003e80  64 20 65 76 65 72 79 20  74 77 6f 20 77 65 65 6b  |d every two week|
00003e90  73 20 74 6f 0a 55 73 65  6e 65 74 20 6e 65 77 73  |s to.Usenet news|
00003ea0  67 72 6f 75 70 73 20 63  6f 6d 70 2e 67 72 61 70  |groups comp.grap|
00003eb0  68 69 63 73 2c 20 6e 65  77 73 2e 61 6e 73 77 65  |hics, news.answe|
00003ec0  72 73 2c 20 61 6e 64 20  6f 74 68 65 72 20 67 72  |rs, and other gr|
00003ed0  6f 75 70 73 2e 20 20 59  6f 75 20 63 61 6e 0a 61  |oups.  You can.a|
00003ee0  6c 77 61 79 73 20 6f 62  74 61 69 6e 20 74 68 65  |lways obtain the|
00003ef0  20 6c 61 74 65 73 74 20  76 65 72 73 69 6f 6e 20  | latest version |
00003f00  66 72 6f 6d 20 74 68 65  20 6e 65 77 73 2e 61 6e  |from the news.an|
00003f10  73 77 65 72 73 20 61 72  63 68 69 76 65 20 61 74  |swers archive at|
00003f20  0a 72 74 66 6d 2e 6d 69  74 2e 65 64 75 2e 20 20  |.rtfm.mit.edu.  |
00003f30  42 79 20 46 54 50 2c 20  66 65 74 63 68 20 2f 70  |By FTP, fetch /p|
00003f40  75 62 2f 75 73 65 6e 65  74 2f 6e 65 77 73 2e 61  |ub/usenet/news.a|
00003f50  6e 73 77 65 72 73 2f 6a  70 65 67 2d 66 61 71 2f  |nswers/jpeg-faq/|
00003f60  70 61 72 74 31 20 61 6e  64 0a 2e 2e 2e 2f 70 61  |part1 and..../pa|
00003f70  72 74 32 2e 20 20 49 66  20 79 6f 75 20 64 6f 6e  |rt2.  If you don|
00003f80  27 74 20 68 61 76 65 20  46 54 50 2c 20 73 65 6e  |'t have FTP, sen|
00003f90  64 20 65 2d 6d 61 69 6c  20 74 6f 20 6d 61 69 6c  |d e-mail to mail|
00003fa0  2d 73 65 72 76 65 72 40  72 74 66 6d 2e 6d 69 74  |-server@rtfm.mit|
00003fb0  2e 65 64 75 0a 77 69 74  68 20 62 6f 64 79 0a 20  |.edu.with body. |
00003fc0  20 20 20 20 20 20 20 73  65 6e 64 20 75 73 65 6e  |       send usen|
00003fd0  65 74 2f 6e 65 77 73 2e  61 6e 73 77 65 72 73 2f  |et/news.answers/|
00003fe0  6a 70 65 67 2d 66 61 71  2f 70 61 72 74 31 0a 20  |jpeg-faq/part1. |
00003ff0  20 20 20 20 20 20 20 73  65 6e 64 20 75 73 65 6e  |       send usen|
00004000  65 74 2f 6e 65 77 73 2e  61 6e 73 77 65 72 73 2f  |et/news.answers/|
00004010  6a 70 65 67 2d 66 61 71  2f 70 61 72 74 32 0a 0a  |jpeg-faq/part2..|
00004020  0a 52 45 4c 41 54 45 44  20 53 4f 46 54 57 41 52  |.RELATED SOFTWAR|
00004030  45 0a 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |E.==============|
00004040  3d 3d 0a 0a 4e 75 6d 65  72 6f 75 73 20 76 69 65  |==..Numerous vie|
00004050  77 69 6e 67 20 61 6e 64  20 69 6d 61 67 65 20 6d  |wing and image m|
00004060  61 6e 69 70 75 6c 61 74  69 6f 6e 20 70 72 6f 67  |anipulation prog|
00004070  72 61 6d 73 20 6e 6f 77  20 73 75 70 70 6f 72 74  |rams now support|
00004080  20 4a 50 45 47 2e 20 20  28 51 75 69 74 65 20 61  | JPEG.  (Quite a|
00004090  0a 66 65 77 20 6f 66 20  74 68 65 6d 20 75 73 65  |.few of them use|
000040a0  20 74 68 69 73 20 6c 69  62 72 61 72 79 20 74 6f  | this library to|
000040b0  20 64 6f 20 73 6f 2e 29  20 20 54 68 65 20 4a 50  | do so.)  The JP|
000040c0  45 47 20 46 41 51 20 64  65 73 63 72 69 62 65 64  |EG FAQ described|
000040d0  20 61 62 6f 76 65 20 6c  69 73 74 73 0a 73 6f 6d  | above lists.som|
000040e0  65 20 6f 66 20 74 68 65  20 6d 6f 72 65 20 70 6f  |e of the more po|
000040f0  70 75 6c 61 72 20 66 72  65 65 20 61 6e 64 20 73  |pular free and s|
00004100  68 61 72 65 77 61 72 65  20 76 69 65 77 65 72 73  |hareware viewers|
00004110  2c 20 61 6e 64 20 74 65  6c 6c 73 20 77 68 65 72  |, and tells wher|
00004120  65 20 74 6f 0a 6f 62 74  61 69 6e 20 74 68 65 6d  |e to.obtain them|
00004130  20 6f 6e 20 49 6e 74 65  72 6e 65 74 2e 0a 0a 49  | on Internet...I|
00004140  66 20 79 6f 75 20 61 72  65 20 6f 6e 20 61 20 55  |f you are on a U|
00004150  6e 69 78 20 6d 61 63 68  69 6e 65 2c 20 77 65 20  |nix machine, we |
00004160  68 69 67 68 6c 79 20 72  65 63 6f 6d 6d 65 6e 64  |highly recommend|
00004170  20 4a 65 66 20 50 6f 73  6b 61 6e 7a 65 72 27 73  | Jef Poskanzer's|
00004180  20 66 72 65 65 0a 50 42  4d 50 4c 55 53 20 69 6d  | free.PBMPLUS im|
00004190  61 67 65 20 73 6f 66 74  77 61 72 65 2c 20 77 68  |age software, wh|
000041a0  69 63 68 20 70 72 6f 76  69 64 65 73 20 6d 61 6e  |ich provides man|
000041b0  79 20 75 73 65 66 75 6c  20 6f 70 65 72 61 74 69  |y useful operati|
000041c0  6f 6e 73 20 6f 6e 20 50  50 4d 2d 66 6f 72 6d 61  |ons on PPM-forma|
000041d0  74 0a 69 6d 61 67 65 20  66 69 6c 65 73 2e 20 20  |t.image files.  |
000041e0  49 6e 20 70 61 72 74 69  63 75 6c 61 72 2c 20 69  |In particular, i|
000041f0  74 20 63 61 6e 20 63 6f  6e 76 65 72 74 20 50 50  |t can convert PP|
00004200  4d 20 69 6d 61 67 65 73  20 74 6f 20 61 6e 64 20  |M images to and |
00004210  66 72 6f 6d 20 61 20 77  69 64 65 0a 72 61 6e 67  |from a wide.rang|
00004220  65 20 6f 66 20 6f 74 68  65 72 20 66 6f 72 6d 61  |e of other forma|
00004230  74 73 2e 20 20 59 6f 75  20 63 61 6e 20 6f 62 74  |ts.  You can obt|
00004240  61 69 6e 20 74 68 69 73  20 70 61 63 6b 61 67 65  |ain this package|
00004250  20 62 79 20 46 54 50 20  66 72 6f 6d 20 66 74 70  | by FTP from ftp|
00004260  2e 78 2e 6f 72 67 0a 28  63 6f 6e 74 72 69 62 2f  |.x.org.(contrib/|
00004270  70 62 6d 70 6c 75 73 2a  2e 74 61 72 2e 5a 29 20  |pbmplus*.tar.Z) |
00004280  6f 72 20 66 74 70 2e 65  65 2e 6c 62 6c 2e 67 6f  |or ftp.ee.lbl.go|
00004290  76 20 28 70 62 6d 70 6c  75 73 2a 2e 74 61 72 2e  |v (pbmplus*.tar.|
000042a0  5a 29 2e 20 20 54 68 65  72 65 20 69 73 20 61 6c  |Z).  There is al|
000042b0  73 6f 0a 61 20 6e 65 77  65 72 20 75 70 64 61 74  |so.a newer updat|
000042c0  65 20 6f 66 20 74 68 69  73 20 70 61 63 6b 61 67  |e of this packag|
000042d0  65 20 63 61 6c 6c 65 64  20 4e 45 54 50 42 4d 2c  |e called NETPBM,|
000042e0  20 61 76 61 69 6c 61 62  6c 65 20 66 72 6f 6d 0a  | available from.|
000042f0  77 75 61 72 63 68 69 76  65 2e 77 75 73 74 6c 2e  |wuarchive.wustl.|
00004300  65 64 75 20 75 6e 64 65  72 20 64 69 72 65 63 74  |edu under direct|
00004310  6f 72 79 20 2f 67 72 61  70 68 69 63 73 2f 67 72  |ory /graphics/gr|
00004320  61 70 68 69 63 73 2f 70  61 63 6b 61 67 65 73 2f  |aphics/packages/|
00004330  4e 65 74 50 42 4d 2f 2e  0a 55 6e 66 6f 72 74 75  |NetPBM/..Unfortu|
00004340  6e 61 74 65 6c 79 20 50  42 4d 50 4c 55 53 2f 4e  |nately PBMPLUS/N|
00004350  45 54 50 42 4d 20 69 73  20 6e 6f 74 20 6e 65 61  |ETPBM is not nea|
00004360  72 6c 79 20 61 73 20 70  6f 72 74 61 62 6c 65 20  |rly as portable |
00004370  61 73 20 74 68 65 20 49  4a 47 20 73 6f 66 74 77  |as the IJG softw|
00004380  61 72 65 0a 69 73 3b 20  79 6f 75 20 61 72 65 20  |are.is; you are |
00004390  6c 69 6b 65 6c 79 20 74  6f 20 68 61 76 65 20 64  |likely to have d|
000043a0  69 66 66 69 63 75 6c 74  79 20 6d 61 6b 69 6e 67  |ifficulty making|
000043b0  20 69 74 20 77 6f 72 6b  20 6f 6e 20 61 6e 79 20  | it work on any |
000043c0  6e 6f 6e 2d 55 6e 69 78  20 6d 61 63 68 69 6e 65  |non-Unix machine|
000043d0  2e 0a 0a 41 20 64 69 66  66 65 72 65 6e 74 20 66  |...A different f|
000043e0  72 65 65 20 4a 50 45 47  20 69 6d 70 6c 65 6d 65  |ree JPEG impleme|
000043f0  6e 74 61 74 69 6f 6e 2c  20 77 72 69 74 74 65 6e  |ntation, written|
00004400  20 62 79 20 74 68 65 20  50 56 52 47 20 67 72 6f  | by the PVRG gro|
00004410  75 70 20 61 74 20 53 74  61 6e 66 6f 72 64 2c 0a  |up at Stanford,.|
00004420  69 73 20 61 76 61 69 6c  61 62 6c 65 20 66 72 6f  |is available fro|
00004430  6d 20 68 61 76 65 66 75  6e 2e 73 74 61 6e 66 6f  |m havefun.stanfo|
00004440  72 64 2e 65 64 75 20 69  6e 20 64 69 72 65 63 74  |rd.edu in direct|
00004450  6f 72 79 20 70 75 62 2f  6a 70 65 67 2e 20 20 54  |ory pub/jpeg.  T|
00004460  68 69 73 20 70 72 6f 67  72 61 6d 0a 69 73 20 64  |his program.is d|
00004470  65 73 69 67 6e 65 64 20  66 6f 72 20 72 65 73 65  |esigned for rese|
00004480  61 72 63 68 20 61 6e 64  20 65 78 70 65 72 69 6d  |arch and experim|
00004490  65 6e 74 61 74 69 6f 6e  20 72 61 74 68 65 72 20  |entation rather |
000044a0  74 68 61 6e 20 70 72 6f  64 75 63 74 69 6f 6e 20  |than production |
000044b0  75 73 65 3b 0a 69 74 20  69 73 20 73 6c 6f 77 65  |use;.it is slowe|
000044c0  72 2c 20 68 61 72 64 65  72 20 74 6f 20 75 73 65  |r, harder to use|
000044d0  2c 20 61 6e 64 20 6c 65  73 73 20 70 6f 72 74 61  |, and less porta|
000044e0  62 6c 65 20 74 68 61 6e  20 74 68 65 20 49 4a 47  |ble than the IJG|
000044f0  20 63 6f 64 65 2c 20 62  75 74 20 69 74 0a 69 73  | code, but it.is|
00004500  20 65 61 73 69 65 72 20  74 6f 20 72 65 61 64 20  | easier to read |
00004510  61 6e 64 20 6d 6f 64 69  66 79 2e 20 20 41 6c 73  |and modify.  Als|
00004520  6f 2c 20 74 68 65 20 50  56 52 47 20 63 6f 64 65  |o, the PVRG code|
00004530  20 73 75 70 70 6f 72 74  73 20 6c 6f 73 73 6c 65  | supports lossle|
00004540  73 73 20 4a 50 45 47 2c  0a 77 68 69 63 68 20 77  |ss JPEG,.which w|
00004550  65 20 64 6f 20 6e 6f 74  2e 0a 0a 0a 46 49 4c 45  |e do not....FILE|
00004560  20 46 4f 52 4d 41 54 20  57 41 52 53 0a 3d 3d 3d  | FORMAT WARS.===|
00004570  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 0a 0a 53  |=============..S|
00004580  6f 6d 65 20 4a 50 45 47  20 70 72 6f 67 72 61 6d  |ome JPEG program|
00004590  73 20 70 72 6f 64 75 63  65 20 66 69 6c 65 73 20  |s produce files |
000045a0  74 68 61 74 20 61 72 65  20 6e 6f 74 20 63 6f 6d  |that are not com|
000045b0  70 61 74 69 62 6c 65 20  77 69 74 68 20 6f 75 72  |patible with our|
000045c0  20 6c 69 62 72 61 72 79  2e 0a 54 68 65 20 72 6f  | library..The ro|
000045d0  6f 74 20 6f 66 20 74 68  65 20 70 72 6f 62 6c 65  |ot of the proble|
000045e0  6d 20 69 73 20 74 68 61  74 20 74 68 65 20 49 53  |m is that the IS|
000045f0  4f 20 4a 50 45 47 20 63  6f 6d 6d 69 74 74 65 65  |O JPEG committee|
00004600  20 66 61 69 6c 65 64 20  74 6f 20 73 70 65 63 69  | failed to speci|
00004610  66 79 20 61 0a 63 6f 6e  63 72 65 74 65 20 66 69  |fy a.concrete fi|
00004620  6c 65 20 66 6f 72 6d 61  74 2e 20 20 53 6f 6d 65  |le format.  Some|
00004630  20 76 65 6e 64 6f 72 73  20 22 66 69 6c 6c 65 64  | vendors "filled|
00004640  20 69 6e 20 74 68 65 20  62 6c 61 6e 6b 73 22 20  | in the blanks" |
00004650  6f 6e 20 74 68 65 69 72  20 6f 77 6e 2c 0a 63 72  |on their own,.cr|
00004660  65 61 74 69 6e 67 20 70  72 6f 70 72 69 65 74 61  |eating proprieta|
00004670  72 79 20 66 6f 72 6d 61  74 73 20 74 68 61 74 20  |ry formats that |
00004680  6e 6f 20 6f 6e 65 20 65  6c 73 65 20 63 6f 75 6c  |no one else coul|
00004690  64 20 72 65 61 64 2e 20  20 28 46 6f 72 20 65 78  |d read.  (For ex|
000046a0  61 6d 70 6c 65 2c 20 6e  6f 6e 65 0a 6f 66 20 74  |ample, none.of t|
000046b0  68 65 20 65 61 72 6c 79  20 63 6f 6d 6d 65 72 63  |he early commerc|
000046c0  69 61 6c 20 4a 50 45 47  20 69 6d 70 6c 65 6d 65  |ial JPEG impleme|
000046d0  6e 74 61 74 69 6f 6e 73  20 66 6f 72 20 74 68 65  |ntations for the|
000046e0  20 4d 61 63 69 6e 74 6f  73 68 20 77 65 72 65 20  | Macintosh were |
000046f0  61 62 6c 65 20 74 6f 0a  65 78 63 68 61 6e 67 65  |able to.exchange|
00004700  20 63 6f 6d 70 72 65 73  73 65 64 20 66 69 6c 65  | compressed file|
00004710  73 2e 29 0a 0a 54 68 65  20 66 69 6c 65 20 66 6f  |s.)..The file fo|
00004720  72 6d 61 74 20 77 65 20  68 61 76 65 20 61 64 6f  |rmat we have ado|
00004730  70 74 65 64 20 69 73 20  63 61 6c 6c 65 64 20 4a  |pted is called J|
00004740  46 49 46 20 28 73 65 65  20 52 45 46 45 52 45 4e  |FIF (see REFEREN|
00004750  43 45 53 29 2e 20 20 54  68 69 73 20 66 6f 72 6d  |CES).  This form|
00004760  61 74 0a 68 61 73 20 62  65 65 6e 20 61 67 72 65  |at.has been agre|
00004770  65 64 20 74 6f 20 62 79  20 61 20 6e 75 6d 62 65  |ed to by a numbe|
00004780  72 20 6f 66 20 6d 61 6a  6f 72 20 63 6f 6d 6d 65  |r of major comme|
00004790  72 63 69 61 6c 20 4a 50  45 47 20 76 65 6e 64 6f  |rcial JPEG vendo|
000047a0  72 73 2c 20 61 6e 64 20  69 74 20 68 61 73 0a 62  |rs, and it has.b|
000047b0  65 63 6f 6d 65 20 74 68  65 20 64 65 20 66 61 63  |ecome the de fac|
000047c0  74 6f 20 73 74 61 6e 64  61 72 64 2e 20 20 4a 46  |to standard.  JF|
000047d0  49 46 20 69 73 20 61 20  6d 69 6e 69 6d 61 6c 20  |IF is a minimal |
000047e0  6f 72 20 22 6c 6f 77 20  65 6e 64 22 20 72 65 70  |or "low end" rep|
000047f0  72 65 73 65 6e 74 61 74  69 6f 6e 2e 0a 57 65 20  |resentation..We |
00004800  72 65 63 6f 6d 6d 65 6e  64 20 74 68 65 20 75 73  |recommend the us|
00004810  65 20 6f 66 20 54 49 46  46 2f 4a 50 45 47 20 28  |e of TIFF/JPEG (|
00004820  54 49 46 46 20 72 65 76  69 73 69 6f 6e 20 36 2e  |TIFF revision 6.|
00004830  30 20 61 73 20 6d 6f 64  69 66 69 65 64 20 62 79  |0 as modified by|
00004840  20 54 49 46 46 0a 54 65  63 68 6e 69 63 61 6c 20  | TIFF.Technical |
00004850  4e 6f 74 65 20 23 32 29  20 66 6f 72 20 22 68 69  |Note #2) for "hi|
00004860  67 68 20 65 6e 64 22 20  61 70 70 6c 69 63 61 74  |gh end" applicat|
00004870  69 6f 6e 73 20 74 68 61  74 20 6e 65 65 64 20 74  |ions that need t|
00004880  6f 20 72 65 63 6f 72 64  20 61 20 6c 6f 74 20 6f  |o record a lot o|
00004890  66 0a 61 64 64 69 74 69  6f 6e 61 6c 20 64 61 74  |f.additional dat|
000048a0  61 20 61 62 6f 75 74 20  61 6e 20 69 6d 61 67 65  |a about an image|
000048b0  2e 20 20 54 49 46 46 2f  4a 50 45 47 20 69 73 20  |.  TIFF/JPEG is |
000048c0  66 61 69 72 6c 79 20 6e  65 77 20 61 6e 64 20 6e  |fairly new and n|
000048d0  6f 74 20 79 65 74 20 77  69 64 65 6c 79 0a 73 75  |ot yet widely.su|
000048e0  70 70 6f 72 74 65 64 2c  20 75 6e 66 6f 72 74 75  |pported, unfortu|
000048f0  6e 61 74 65 6c 79 2e 0a  0a 54 68 65 20 75 70 63  |nately...The upc|
00004900  6f 6d 69 6e 67 20 4a 50  45 47 20 50 61 72 74 20  |oming JPEG Part |
00004910  33 20 73 74 61 6e 64 61  72 64 20 64 65 66 69 6e  |3 standard defin|
00004920  65 73 20 61 20 66 69 6c  65 20 66 6f 72 6d 61 74  |es a file format|
00004930  20 63 61 6c 6c 65 64 20  53 50 49 46 46 2e 0a 53  | called SPIFF..S|
00004940  50 49 46 46 20 69 73 20  69 6e 74 65 72 6f 70 65  |PIFF is interope|
00004950  72 61 62 6c 65 20 77 69  74 68 20 4a 46 49 46 2c  |rable with JFIF,|
00004960  20 69 6e 20 74 68 65 20  73 65 6e 73 65 20 74 68  | in the sense th|
00004970  61 74 20 6d 6f 73 74 20  4a 46 49 46 20 64 65 63  |at most JFIF dec|
00004980  6f 64 65 72 73 20 73 68  6f 75 6c 64 0a 62 65 20  |oders should.be |
00004990  61 62 6c 65 20 74 6f 20  72 65 61 64 20 74 68 65  |able to read the|
000049a0  20 6d 6f 73 74 20 63 6f  6d 6d 6f 6e 20 76 61 72  | most common var|
000049b0  69 61 6e 74 20 6f 66 20  53 50 49 46 46 2e 20 20  |iant of SPIFF.  |
000049c0  53 50 49 46 46 20 68 61  73 20 73 6f 6d 65 20 74  |SPIFF has some t|
000049d0  65 63 68 6e 69 63 61 6c  0a 61 64 76 61 6e 74 61  |echnical.advanta|
000049e0  67 65 73 20 6f 76 65 72  20 4a 46 49 46 2c 20 62  |ges over JFIF, b|
000049f0  75 74 20 69 74 73 20 6d  61 6a 6f 72 20 63 6c 61  |ut its major cla|
00004a00  69 6d 20 74 6f 20 66 61  6d 65 20 69 73 20 73 69  |im to fame is si|
00004a10  6d 70 6c 79 20 74 68 61  74 20 69 74 20 69 73 20  |mply that it is |
00004a20  61 6e 0a 6f 66 66 69 63  69 61 6c 20 73 74 61 6e  |an.official stan|
00004a30  64 61 72 64 20 72 61 74  68 65 72 20 74 68 61 6e  |dard rather than|
00004a40  20 61 6e 20 69 6e 66 6f  72 6d 61 6c 20 6f 6e 65  | an informal one|
00004a50  2e 20 20 41 74 20 74 68  69 73 20 70 6f 69 6e 74  |.  At this point|
00004a60  20 69 74 20 69 73 20 75  6e 63 6c 65 61 72 0a 77  | it is unclear.w|
00004a70  68 65 74 68 65 72 20 53  50 49 46 46 20 77 69 6c  |hether SPIFF wil|
00004a80  6c 20 73 75 70 65 72 73  65 64 65 20 4a 46 49 46  |l supersede JFIF|
00004a90  20 6f 72 20 77 68 65 74  68 65 72 20 4a 46 49 46  | or whether JFIF|
00004aa0  20 77 69 6c 6c 20 72 65  6d 61 69 6e 20 74 68 65  | will remain the|
00004ab0  20 64 65 2d 66 61 63 74  6f 0a 73 74 61 6e 64 61  | de-facto.standa|
00004ac0  72 64 2e 20 20 49 4a 47  20 69 6e 74 65 6e 64 73  |rd.  IJG intends|
00004ad0  20 74 6f 20 73 75 70 70  6f 72 74 20 53 50 49 46  | to support SPIF|
00004ae0  46 20 6f 6e 63 65 20 74  68 65 20 73 74 61 6e 64  |F once the stand|
00004af0  61 72 64 20 69 73 20 66  72 6f 7a 65 6e 2c 20 62  |ard is frozen, b|
00004b00  75 74 20 77 65 0a 68 61  76 65 20 6e 6f 74 20 64  |ut we.have not d|
00004b10  65 63 69 64 65 64 20 77  68 65 74 68 65 72 20 69  |ecided whether i|
00004b20  74 20 73 68 6f 75 6c 64  20 62 65 63 6f 6d 65 20  |t should become |
00004b30  6f 75 72 20 64 65 66 61  75 6c 74 20 6f 75 74 70  |our default outp|
00004b40  75 74 20 66 6f 72 6d 61  74 20 6f 72 20 6e 6f 74  |ut format or not|
00004b50  2e 0a 28 49 6e 20 61 6e  79 20 63 61 73 65 2c 20  |..(In any case, |
00004b60  6f 75 72 20 64 65 63 6f  64 65 72 20 77 69 6c 6c  |our decoder will|
00004b70  20 72 65 6d 61 69 6e 20  63 61 70 61 62 6c 65 20  | remain capable |
00004b80  6f 66 20 72 65 61 64 69  6e 67 20 4a 46 49 46 20  |of reading JFIF |
00004b90  69 6e 64 65 66 69 6e 69  74 65 6c 79 2e 29 0a 0a  |indefinitely.)..|
00004ba0  56 61 72 69 6f 75 73 20  70 72 6f 70 72 69 65 74  |Various propriet|
00004bb0  61 72 79 20 66 69 6c 65  20 66 6f 72 6d 61 74 73  |ary file formats|
00004bc0  20 69 6e 63 6f 72 70 6f  72 61 74 69 6e 67 20 4a  | incorporating J|
00004bd0  50 45 47 20 63 6f 6d 70  72 65 73 73 69 6f 6e 20  |PEG compression |
00004be0  61 6c 73 6f 20 65 78 69  73 74 2e 0a 57 65 20 68  |also exist..We h|
00004bf0  61 76 65 20 6c 69 74 74  6c 65 20 6f 72 20 6e 6f  |ave little or no|
00004c00  20 73 79 6d 70 61 74 68  79 20 66 6f 72 20 74 68  | sympathy for th|
00004c10  65 20 65 78 69 73 74 65  6e 63 65 20 6f 66 20 74  |e existence of t|
00004c20  68 65 73 65 20 66 6f 72  6d 61 74 73 2e 20 20 49  |hese formats.  I|
00004c30  6e 64 65 65 64 2c 0a 6f  6e 65 20 6f 66 20 74 68  |ndeed,.one of th|
00004c40  65 20 6f 72 69 67 69 6e  61 6c 20 72 65 61 73 6f  |e original reaso|
00004c50  6e 73 20 66 6f 72 20 64  65 76 65 6c 6f 70 69 6e  |ns for developin|
00004c60  67 20 74 68 69 73 20 66  72 65 65 20 73 6f 66 74  |g this free soft|
00004c70  77 61 72 65 20 77 61 73  20 74 6f 20 68 65 6c 70  |ware was to help|
00004c80  0a 66 6f 72 63 65 20 63  6f 6e 76 65 72 67 65 6e  |.force convergen|
00004c90  63 65 20 6f 6e 20 63 6f  6d 6d 6f 6e 2c 20 6f 70  |ce on common, op|
00004ca0  65 6e 20 66 6f 72 6d 61  74 20 73 74 61 6e 64 61  |en format standa|
00004cb0  72 64 73 20 66 6f 72 20  4a 50 45 47 20 66 69 6c  |rds for JPEG fil|
00004cc0  65 73 2e 20 20 44 6f 6e  27 74 0a 75 73 65 20 61  |es.  Don't.use a|
00004cd0  20 70 72 6f 70 72 69 65  74 61 72 79 20 66 69 6c  | proprietary fil|
00004ce0  65 20 66 6f 72 6d 61 74  21 0a 0a 0a 54 4f 20 44  |e format!...TO D|
00004cf0  4f 0a 3d 3d 3d 3d 3d 0a  0a 49 6e 20 66 75 74 75  |O.=====..In futu|
00004d00  72 65 20 76 65 72 73 69  6f 6e 73 2c 20 77 65 20  |re versions, we |
00004d10  61 72 65 20 63 6f 6e 73  69 64 65 72 69 6e 67 20  |are considering |
00004d20  73 75 70 70 6f 72 74 69  6e 67 20 73 6f 6d 65 20  |supporting some |
00004d30  6f 66 20 74 68 65 20 75  70 63 6f 6d 69 6e 67 20  |of the upcoming |
00004d40  4a 50 45 47 0a 50 61 72  74 20 33 20 65 78 74 65  |JPEG.Part 3 exte|
00004d50  6e 73 69 6f 6e 73 20 2d  2d 2d 20 70 72 69 6e 63  |nsions --- princ|
00004d60  69 70 61 6c 6c 79 2c 20  76 61 72 69 61 62 6c 65  |ipally, variable|
00004d70  20 71 75 61 6e 74 69 7a  61 74 69 6f 6e 20 61 6e  | quantization an|
00004d80  64 20 74 68 65 20 53 50  49 46 46 20 66 69 6c 65  |d the SPIFF file|
00004d90  0a 66 6f 72 6d 61 74 2e  0a 0a 54 75 6e 69 6e 67  |.format...Tuning|
00004da0  20 74 68 65 20 73 6f 66  74 77 61 72 65 20 66 6f  | the software fo|
00004db0  72 20 62 65 74 74 65 72  20 62 65 68 61 76 69 6f  |r better behavio|
00004dc0  72 20 61 74 20 6c 6f 77  20 71 75 61 6c 69 74 79  |r at low quality|
00004dd0  2f 68 69 67 68 20 63 6f  6d 70 72 65 73 73 69 6f  |/high compressio|
00004de0  6e 0a 73 65 74 74 69 6e  67 73 20 69 73 20 61 6c  |n.settings is al|
00004df0  73 6f 20 6f 66 20 69 6e  74 65 72 65 73 74 2e 20  |so of interest. |
00004e00  20 54 68 65 20 63 75 72  72 65 6e 74 20 6d 65 74  | The current met|
00004e10  68 6f 64 20 66 6f 72 20  73 63 61 6c 69 6e 67 20  |hod for scaling |
00004e20  74 68 65 0a 71 75 61 6e  74 69 7a 61 74 69 6f 6e  |the.quantization|
00004e30  20 74 61 62 6c 65 73 20  69 73 20 6b 6e 6f 77 6e  | tables is known|
00004e40  20 6e 6f 74 20 74 6f 20  62 65 20 76 65 72 79 20  | not to be very |
00004e50  67 6f 6f 64 20 61 74 20  6c 6f 77 20 51 20 76 61  |good at low Q va|
00004e60  6c 75 65 73 2e 0a 0a 41  73 20 61 6c 77 61 79 73  |lues...As always|
00004e70  2c 20 73 70 65 65 64 69  6e 67 20 74 68 69 6e 67  |, speeding thing|
00004e80  73 20 75 70 20 69 73 20  68 69 67 68 20 6f 6e 20  |s up is high on |
00004e90  6f 75 72 20 70 72 69 6f  72 69 74 79 20 6c 69 73  |our priority lis|
00004ea0  74 2e 0a 0a 50 6c 65 61  73 65 20 73 65 6e 64 20  |t...Please send |
00004eb0  62 75 67 20 72 65 70 6f  72 74 73 2c 20 6f 66 66  |bug reports, off|
00004ec0  65 72 73 20 6f 66 20 68  65 6c 70 2c 20 65 74 63  |ers of help, etc|
00004ed0  2e 20 74 6f 20 6a 70 65  67 2d 69 6e 66 6f 40 75  |. to jpeg-info@u|
00004ee0  75 6e 65 74 2e 75 75 2e  6e 65 74 2e 0a           |unet.uu.net..|
00004eed