kusano 7d535a
The Independent JPEG Group's JPEG software
kusano 7d535a
==========================================
kusano 7d535a
kusano 7d535a
README for release 9 of 13-Jan-2013
kusano 7d535a
===================================
kusano 7d535a
kusano 7d535a
This distribution contains the ninth public release of the Independent JPEG
kusano 7d535a
Group's free JPEG software.  You are welcome to redistribute this software and
kusano 7d535a
to use it for any purpose, subject to the conditions under LEGAL ISSUES, below.
kusano 7d535a
kusano 7d535a
This software is the work of Tom Lane, Guido Vollbeding, Philip Gladstone,
kusano 7d535a
Bill Allombert, Jim Boucher, Lee Crocker, Bob Friesenhahn, Ben Jackson,
kusano 7d535a
Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi, Ge' Weijers,
kusano 7d535a
and other members of the Independent JPEG Group.
kusano 7d535a
kusano 7d535a
IJG is not affiliated with the ISO/IEC JTC1/SC29/WG1 standards committee
kusano 7d535a
(also known as JPEG, together with ITU-T SG16).
kusano 7d535a
kusano 7d535a
kusano 7d535a
DOCUMENTATION ROADMAP
kusano 7d535a
=====================
kusano 7d535a
kusano 7d535a
This file contains the following sections:
kusano 7d535a
kusano 7d535a
OVERVIEW            General description of JPEG and the IJG software.
kusano 7d535a
LEGAL ISSUES        Copyright, lack of warranty, terms of distribution.
kusano 7d535a
REFERENCES          Where to learn more about JPEG.
kusano 7d535a
ARCHIVE LOCATIONS   Where to find newer versions of this software.
kusano 7d535a
ACKNOWLEDGMENTS     Special thanks.
kusano 7d535a
FILE FORMAT WARS    Software *not* to get.
kusano 7d535a
TO DO               Plans for future IJG releases.
kusano 7d535a
kusano 7d535a
Other documentation files in the distribution are:
kusano 7d535a
kusano 7d535a
User documentation:
kusano 7d535a
  install.txt       How to configure and install the IJG software.
kusano 7d535a
  usage.txt         Usage instructions for cjpeg, djpeg, jpegtran,
kusano 7d535a
                    rdjpgcom, and wrjpgcom.
kusano 7d535a
  *.1               Unix-style man pages for programs (same info as usage.txt).
kusano 7d535a
  wizard.txt        Advanced usage instructions for JPEG wizards only.
kusano 7d535a
  change.log        Version-to-version change highlights.
kusano 7d535a
Programmer and internal documentation:
kusano 7d535a
  libjpeg.txt       How to use the JPEG library in your own programs.
kusano 7d535a
  example.c         Sample code for calling the JPEG library.
kusano 7d535a
  structure.txt     Overview of the JPEG library's internal structure.
kusano 7d535a
  filelist.txt      Road map of IJG files.
kusano 7d535a
  coderules.txt     Coding style rules --- please read if you contribute code.
kusano 7d535a
kusano 7d535a
Please read at least the files install.txt and usage.txt.  Some information
kusano 7d535a
can also be found in the JPEG FAQ (Frequently Asked Questions) article.  See
kusano 7d535a
ARCHIVE LOCATIONS below to find out where to obtain the FAQ article.
kusano 7d535a
kusano 7d535a
If you want to understand how the JPEG code works, we suggest reading one or
kusano 7d535a
more of the REFERENCES, then looking at the documentation files (in roughly
kusano 7d535a
the order listed) before diving into the code.
kusano 7d535a
kusano 7d535a
kusano 7d535a
OVERVIEW
kusano 7d535a
========
kusano 7d535a
kusano 7d535a
This package contains C software to implement JPEG image encoding, decoding,
kusano 7d535a
and transcoding.  JPEG (pronounced "jay-peg") is a standardized compression
kusano 7d535a
method for full-color and gray-scale images.
kusano 7d535a
kusano 7d535a
This software implements JPEG baseline, extended-sequential, and progressive
kusano 7d535a
compression processes.  Provision is made for supporting all variants of these
kusano 7d535a
processes, although some uncommon parameter settings aren't implemented yet.
kusano 7d535a
We have made no provision for supporting the hierarchical or lossless
kusano 7d535a
processes defined in the standard.
kusano 7d535a
kusano 7d535a
We provide a set of library routines for reading and writing JPEG image files,
kusano 7d535a
plus two sample applications "cjpeg" and "djpeg", which use the library to
kusano 7d535a
perform conversion between JPEG and some other popular image file formats.
kusano 7d535a
The library is intended to be reused in other applications.
kusano 7d535a
kusano 7d535a
In order to support file conversion and viewing software, we have included
kusano 7d535a
considerable functionality beyond the bare JPEG coding/decoding capability;
kusano 7d535a
for example, the color quantization modules are not strictly part of JPEG
kusano 7d535a
decoding, but they are essential for output to colormapped file formats or
kusano 7d535a
colormapped displays.  These extra functions can be compiled out of the
kusano 7d535a
library if not required for a particular application.
kusano 7d535a
kusano 7d535a
We have also included "jpegtran", a utility for lossless transcoding between
kusano 7d535a
different JPEG processes, and "rdjpgcom" and "wrjpgcom", two simple
kusano 7d535a
applications for inserting and extracting textual comments in JFIF files.
kusano 7d535a
kusano 7d535a
The emphasis in designing this software has been on achieving portability and
kusano 7d535a
flexibility, while also making it fast enough to be useful.  In particular,
kusano 7d535a
the software is not intended to be read as a tutorial on JPEG.  (See the
kusano 7d535a
REFERENCES section for introductory material.)  Rather, it is intended to
kusano 7d535a
be reliable, portable, industrial-strength code.  We do not claim to have
kusano 7d535a
achieved that goal in every aspect of the software, but we strive for it.
kusano 7d535a
kusano 7d535a
We welcome the use of this software as a component of commercial products.
kusano 7d535a
No royalty is required, but we do ask for an acknowledgement in product
kusano 7d535a
documentation, as described under LEGAL ISSUES.
kusano 7d535a
kusano 7d535a
kusano 7d535a
LEGAL ISSUES
kusano 7d535a
============
kusano 7d535a
kusano 7d535a
In plain English:
kusano 7d535a
kusano 7d535a
1. We don't promise that this software works.  (But if you find any bugs,
kusano 7d535a
   please let us know!)
kusano 7d535a
2. You can use this software for whatever you want.  You don't have to pay us.
kusano 7d535a
3. You may not pretend that you wrote this software.  If you use it in a
kusano 7d535a
   program, you must acknowledge somewhere in your documentation that
kusano 7d535a
   you've used the IJG code.
kusano 7d535a
kusano 7d535a
In legalese:
kusano 7d535a
kusano 7d535a
The authors make NO WARRANTY or representation, either express or implied,
kusano 7d535a
with respect to this software, its quality, accuracy, merchantability, or
kusano 7d535a
fitness for a particular purpose.  This software is provided "AS IS", and you,
kusano 7d535a
its user, assume the entire risk as to its quality and accuracy.
kusano 7d535a
kusano 7d535a
This software is copyright (C) 1991-2013, Thomas G. Lane, Guido Vollbeding.
kusano 7d535a
All Rights Reserved except as specified below.
kusano 7d535a
kusano 7d535a
Permission is hereby granted to use, copy, modify, and distribute this
kusano 7d535a
software (or portions thereof) for any purpose, without fee, subject to these
kusano 7d535a
conditions:
kusano 7d535a
(1) If any part of the source code for this software is distributed, then this
kusano 7d535a
README file must be included, with this copyright and no-warranty notice
kusano 7d535a
unaltered; and any additions, deletions, or changes to the original files
kusano 7d535a
must be clearly indicated in accompanying documentation.
kusano 7d535a
(2) If only executable code is distributed, then the accompanying
kusano 7d535a
documentation must state that "this software is based in part on the work of
kusano 7d535a
the Independent JPEG Group".
kusano 7d535a
(3) Permission for use of this software is granted only if the user accepts
kusano 7d535a
full responsibility for any undesirable consequences; the authors accept
kusano 7d535a
NO LIABILITY for damages of any kind.
kusano 7d535a
kusano 7d535a
These conditions apply to any software derived from or based on the IJG code,
kusano 7d535a
not just to the unmodified library.  If you use our work, you ought to
kusano 7d535a
acknowledge us.
kusano 7d535a
kusano 7d535a
Permission is NOT granted for the use of any IJG author's name or company name
kusano 7d535a
in advertising or publicity relating to this software or products derived from
kusano 7d535a
it.  This software may be referred to only as "the Independent JPEG Group's
kusano 7d535a
software".
kusano 7d535a
kusano 7d535a
We specifically permit and encourage the use of this software as the basis of
kusano 7d535a
commercial products, provided that all warranty or liability claims are
kusano 7d535a
assumed by the product vendor.
kusano 7d535a
kusano 7d535a
kusano 7d535a
The Unix configuration script "configure" was produced with GNU Autoconf.
kusano 7d535a
It is copyright by the Free Software Foundation but is freely distributable.
kusano 7d535a
The same holds for its supporting scripts (config.guess, config.sub,
kusano 7d535a
ltmain.sh).  Another support script, install-sh, is copyright by X Consortium
kusano 7d535a
but is also freely distributable.
kusano 7d535a
kusano 7d535a
The IJG distribution formerly included code to read and write GIF files.
kusano 7d535a
To avoid entanglement with the Unisys LZW patent, GIF reading support has
kusano 7d535a
been removed altogether, and the GIF writer has been simplified to produce
kusano 7d535a
"uncompressed GIFs".  This technique does not use the LZW algorithm; the
kusano 7d535a
resulting GIF files are larger than usual, but are readable by all standard
kusano 7d535a
GIF decoders.
kusano 7d535a
kusano 7d535a
We are required to state that
kusano 7d535a
    "The Graphics Interchange Format(c) is the Copyright property of
kusano 7d535a
    CompuServe Incorporated.  GIF(sm) is a Service Mark property of
kusano 7d535a
    CompuServe Incorporated."
kusano 7d535a
kusano 7d535a
kusano 7d535a
REFERENCES
kusano 7d535a
==========
kusano 7d535a
kusano 7d535a
We recommend reading one or more of these references before trying to
kusano 7d535a
understand the innards of the JPEG software.
kusano 7d535a
kusano 7d535a
The best short technical introduction to the JPEG compression algorithm is
kusano 7d535a
	Wallace, Gregory K.  "The JPEG Still Picture Compression Standard",
kusano 7d535a
	Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44.
kusano 7d535a
(Adjacent articles in that issue discuss MPEG motion picture compression,
kusano 7d535a
applications of JPEG, and related topics.)  If you don't have the CACM issue
kusano 7d535a
handy, a PostScript file containing a revised version of Wallace's article is
kusano 7d535a
available at http://www.ijg.org/files/wallace.ps.gz.  The file (actually
kusano 7d535a
a preprint for an article that appeared in IEEE Trans. Consumer Electronics)
kusano 7d535a
omits the sample images that appeared in CACM, but it includes corrections
kusano 7d535a
and some added material.  Note: the Wallace article is copyright ACM and IEEE,
kusano 7d535a
and it may not be used for commercial purposes.
kusano 7d535a
kusano 7d535a
A somewhat less technical, more leisurely introduction to JPEG can be found in
kusano 7d535a
"The Data Compression Book" by Mark Nelson and Jean-loup Gailly, published by
kusano 7d535a
M&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1.  This book provides
kusano 7d535a
good explanations and example C code for a multitude of compression methods
kusano 7d535a
including JPEG.  It is an excellent source if you are comfortable reading C
kusano 7d535a
code but don't know much about data compression in general.  The book's JPEG
kusano 7d535a
sample code is far from industrial-strength, but when you are ready to look
kusano 7d535a
at a full implementation, you've got one here...
kusano 7d535a
kusano 7d535a
The best currently available description of JPEG is the textbook "JPEG Still
kusano 7d535a
Image Data Compression Standard" by William B. Pennebaker and Joan L.
kusano 7d535a
Mitchell, published by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1.
kusano 7d535a
Price US$59.95, 638 pp.  The book includes the complete text of the ISO JPEG
kusano 7d535a
standards (DIS 10918-1 and draft DIS 10918-2).
kusano 7d535a
Although this is by far the most detailed and comprehensive exposition of
kusano 7d535a
JPEG publicly available, we point out that it is still missing an explanation
kusano 7d535a
of the most essential properties and algorithms of the underlying DCT
kusano 7d535a
technology.
kusano 7d535a
If you think that you know about DCT-based JPEG after reading this book,
kusano 7d535a
then you are in delusion.  The real fundamentals and corresponding potential
kusano 7d535a
of DCT-based JPEG are not publicly known so far, and that is the reason for
kusano 7d535a
all the mistaken developments taking place in the image coding domain.
kusano 7d535a
kusano 7d535a
The original JPEG standard is divided into two parts, Part 1 being the actual
kusano 7d535a
specification, while Part 2 covers compliance testing methods.  Part 1 is
kusano 7d535a
titled "Digital Compression and Coding of Continuous-tone Still Images,
kusano 7d535a
Part 1: Requirements and guidelines" and has document numbers ISO/IEC IS
kusano 7d535a
10918-1, ITU-T T.81.  Part 2 is titled "Digital Compression and Coding of
kusano 7d535a
Continuous-tone Still Images, Part 2: Compliance testing" and has document
kusano 7d535a
numbers ISO/IEC IS 10918-2, ITU-T T.83.
kusano 7d535a
IJG JPEG 8 introduced an implementation of the JPEG SmartScale extension
kusano 7d535a
which is specified in two documents:  A contributed document at ITU and ISO
kusano 7d535a
with title "ITU-T JPEG-Plus Proposal for Extending ITU-T T.81 for Advanced
kusano 7d535a
Image Coding", April 2006, Geneva, Switzerland.  The latest version of this
kusano 7d535a
document is Revision 3.  And a contributed document ISO/IEC JTC1/SC29/WG1 N
kusano 7d535a
5799 with title "Evolution of JPEG", June/July 2011, Berlin, Germany.
kusano 7d535a
IJG JPEG 9 introduces a reversible color transform for improved lossless
kusano 7d535a
compression which is described in a contributed document ISO/IEC JTC1/SC29/
kusano 7d535a
WG1 N 6080 with title "JPEG 9 Lossless Coding", June/July 2012, Paris,
kusano 7d535a
France.
kusano 7d535a
kusano 7d535a
The JPEG standard does not specify all details of an interchangeable file
kusano 7d535a
format.  For the omitted details we follow the "JFIF" conventions, revision
kusano 7d535a
1.02.  JFIF 1.02 has been adopted as an Ecma International Technical Report
kusano 7d535a
and thus received a formal publication status.  It is available as a free
kusano 7d535a
download in PDF format from
kusano 7d535a
http://www.ecma-international.org/publications/techreports/E-TR-098.htm.
kusano 7d535a
A PostScript version of the JFIF document is available at
kusano 7d535a
http://www.ijg.org/files/jfif.ps.gz.  There is also a plain text version at
kusano 7d535a
http://www.ijg.org/files/jfif.txt.gz, but it is missing the figures.
kusano 7d535a
kusano 7d535a
The TIFF 6.0 file format specification can be obtained by FTP from
kusano 7d535a
ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz.  The JPEG incorporation scheme
kusano 7d535a
found in the TIFF 6.0 spec of 3-June-92 has a number of serious problems.
kusano 7d535a
IJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6).
kusano 7d535a
Instead, we recommend the JPEG design proposed by TIFF Technical Note #2
kusano 7d535a
(Compression tag 7).  Copies of this Note can be obtained from
kusano 7d535a
http://www.ijg.org/files/.  It is expected that the next revision
kusano 7d535a
of the TIFF spec will replace the 6.0 JPEG design with the Note's design.
kusano 7d535a
Although IJG's own code does not support TIFF/JPEG, the free libtiff library
kusano 7d535a
uses our library to implement TIFF/JPEG per the Note.
kusano 7d535a
kusano 7d535a
kusano 7d535a
ARCHIVE LOCATIONS
kusano 7d535a
=================
kusano 7d535a
kusano 7d535a
The "official" archive site for this software is www.ijg.org.
kusano 7d535a
The most recent released version can always be found there in
kusano 7d535a
directory "files".  This particular version will be archived as
kusano 7d535a
http://www.ijg.org/files/jpegsrc.v9.tar.gz, and in Windows-compatible
kusano 7d535a
"zip" archive format as http://www.ijg.org/files/jpegsr9.zip.
kusano 7d535a
kusano 7d535a
The JPEG FAQ (Frequently Asked Questions) article is a source of some
kusano 7d535a
general information about JPEG.
kusano 7d535a
It is available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/
kusano 7d535a
and other news.answers archive sites, including the official news.answers
kusano 7d535a
archive at rtfm.mit.edu: ftp://rtfm.mit.edu/pub/usenet/news.answers/jpeg-faq/.
kusano 7d535a
If you don't have Web or FTP access, send e-mail to mail-server@rtfm.mit.edu
kusano 7d535a
with body
kusano 7d535a
	send usenet/news.answers/jpeg-faq/part1
kusano 7d535a
	send usenet/news.answers/jpeg-faq/part2
kusano 7d535a
kusano 7d535a
kusano 7d535a
ACKNOWLEDGMENTS
kusano 7d535a
===============
kusano 7d535a
kusano 7d535a
Thank to Juergen Bruder for providing me with a copy of the common DCT
kusano 7d535a
algorithm article, only to find out that I had come to the same result
kusano 7d535a
in a more direct and comprehensible way with a more generative approach.
kusano 7d535a
kusano 7d535a
Thank to Istvan Sebestyen and Joan L. Mitchell for inviting me to the
kusano 7d535a
ITU JPEG (Study Group 16) meeting in Geneva, Switzerland.
kusano 7d535a
kusano 7d535a
Thank to Thomas Wiegand and Gary Sullivan for inviting me to the
kusano 7d535a
Joint Video Team (MPEG & ITU) meeting in Geneva, Switzerland.
kusano 7d535a
kusano 7d535a
Thank to Thomas Richter and Daniel Lee for inviting me to the
kusano 7d535a
ISO/IEC JTC1/SC29/WG1 (also known as JPEG, together with ITU-T SG16)
kusano 7d535a
meeting in Berlin, Germany.
kusano 7d535a
kusano 7d535a
Thank to John Korejwa and Massimo Ballerini for inviting me to
kusano 7d535a
fruitful consultations in Boston, MA and Milan, Italy.
kusano 7d535a
kusano 7d535a
Thank to Hendrik Elstner, Roland Fassauer, Simone Zuck, Guenther
kusano 7d535a
Maier-Gerber, Walter Stoeber, Fred Schmitz, and Norbert Braunagel
kusano 7d535a
for corresponding business development.
kusano 7d535a
kusano 7d535a
Thank to Nico Zschach and Dirk Stelling of the technical support team
kusano 7d535a
at the Digital Images company in Halle for providing me with extra
kusano 7d535a
equipment for configuration tests.
kusano 7d535a
kusano 7d535a
Thank to Richard F. Lyon (then of Foveon Inc.) for fruitful
kusano 7d535a
communication about JPEG configuration in Sigma Photo Pro software.
kusano 7d535a
kusano 7d535a
Thank to Andrew Finkenstadt for hosting the ijg.org site.
kusano 7d535a
kusano 7d535a
Last but not least special thank to Thomas G. Lane for the original
kusano 7d535a
design and development of this singular software package.
kusano 7d535a
kusano 7d535a
kusano 7d535a
FILE FORMAT WARS
kusano 7d535a
================
kusano 7d535a
kusano 7d535a
The ISO/IEC JTC1/SC29/WG1 standards committee (also known as JPEG, together
kusano 7d535a
with ITU-T SG16) currently promotes different formats containing the name
kusano 7d535a
"JPEG" which is misleading because these formats are incompatible with
kusano 7d535a
original DCT-based JPEG and are based on faulty technologies.
kusano 7d535a
IJG therefore does not and will not support such momentary mistakes
kusano 7d535a
(see REFERENCES).
kusano 7d535a
There exist also distributions under the name "OpenJPEG" promoting such
kusano 7d535a
kind of formats which is misleading because they don't support original
kusano 7d535a
JPEG images.
kusano 7d535a
We have no sympathy for the promotion of inferior formats.  Indeed, one of
kusano 7d535a
the original reasons for developing this free software was to help force
kusano 7d535a
convergence on common, interoperable format standards for JPEG files.
kusano 7d535a
Don't use an incompatible file format!
kusano 7d535a
(In any case, our decoder will remain capable of reading existing JPEG
kusano 7d535a
image files indefinitely.)
kusano 7d535a
kusano 7d535a
Furthermore, the ISO committee pretends to be "responsible for the popular
kusano 7d535a
JPEG" in their public reports which is not true because they don't respond to
kusano 7d535a
actual requirements for the maintenance of the original JPEG specification.
kusano 7d535a
kusano 7d535a
There are currently different distributions in circulation containing the
kusano 7d535a
name "libjpeg" which is misleading because they don't have the features and
kusano 7d535a
are incompatible with formats supported by actual IJG libjpeg distributions.
kusano 7d535a
One of those fakes is released by members of the ISO committee and just uses
kusano 7d535a
the name of libjpeg for misdirection of people, similar to the abuse of the
kusano 7d535a
name JPEG as described above, while having nothing in common with actual IJG
kusano 7d535a
libjpeg distributions.
kusano 7d535a
The other one claims to be a "derivative" or "fork" of the original libjpeg
kusano 7d535a
and violates the license conditions as described under LEGAL ISSUES above.
kusano 7d535a
We have no sympathy for the release of misleading and illegal distributions
kusano 7d535a
derived from obsolete code bases.
kusano 7d535a
Don't use an obsolete code base!
kusano 7d535a
kusano 7d535a
kusano 7d535a
TO DO
kusano 7d535a
=====
kusano 7d535a
kusano 7d535a
Version 9 is the second release of a new generation JPEG standard
kusano 7d535a
to overcome the limitations of the original JPEG specification.
kusano 7d535a
More features are being prepared for coming releases...
kusano 7d535a
kusano 7d535a
Please send bug reports, offers of help, etc. to jpeg-info@jpegclub.org.