• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

READMEH A D22-Dec-199417.6 KiB356286

ansi2knr.1H A D22-Dec-1994910 2019

ansi2knr.cH A D22-Dec-199416.1 KiB489254

cderror.hH A D22-Dec-19945.1 KiB13395

cdjpeg.hH A D22-Dec-19944.1 KiB12563

cjpeg.1H A D22-Dec-19949.5 KiB281280

cjpeg.cH A D22-Dec-199427.1 KiB892595

ckconfig.cH A D22-Dec-199411.9 KiB403241

coderules.docH A D22-Dec-19945.2 KiB11995

configureH A D22-Dec-199442.6 KiB1,5881,308

djpeg.1H A D22-Dec-19946.9 KiB246245

djpeg.cH A D22-Dec-199422.2 KiB751514

example.cH A D22-Dec-199415.9 KiB41884

filelist.docH A D22-Dec-19946.8 KiB186138

install.docH A D22-Dec-199434.4 KiB753583

jcapi.cH A D22-Dec-199411.7 KiB370170

jccoefct.cH A D22-Dec-199414.9 KiB415254

jccolor.cH A D22-Dec-199414.5 KiB460283

jcdctmgr.cH A D22-Dec-199412.4 KiB399267

jchuff.cH A D22-Dec-199424.8 KiB848504

jcmainct.cH A D22-Dec-19949.1 KiB299179

jcmarker.cH A D22-Dec-199415.1 KiB606360

jcmaster.cH A D22-Dec-199412.8 KiB394229

jcomapi.cH A D22-Dec-19942.7 KiB9538

jconfig.bccH A D22-Dec-19941.3 KiB4533

jconfig.cfgH A D22-Dec-19941.2 KiB4535

jconfig.djH A D22-Dec-19941.1 KiB3930

jconfig.docH A D22-Dec-19945.2 KiB156124

jconfig.manxH A D22-Dec-19941.2 KiB4432

jconfig.mc6H A D22-Dec-19941.6 KiB5339

jconfig.sasH A D22-Dec-19941.1 KiB4432

jconfig.stH A D22-Dec-19941.1 KiB4030

jconfig.vmsH A D22-Dec-1994979 3829

jcparam.cH A D22-Dec-199415.2 KiB444277

jcprepct.cH A D22-Dec-199412.5 KiB372228

jcsample.cH A D22-Dec-199418.4 KiB520298

jdapi.cH A D22-Dec-199413.5 KiB439252

jdatadst.cH A D22-Dec-19945 KiB15259

jdatasrc.cH A D22-Dec-19947.4 KiB21376

jdcoefct.cH A D22-Dec-199411.9 KiB360234

jdcolor.cH A D22-Dec-199411.9 KiB368224

jdct.hH A D22-Dec-19946.9 KiB17769

jddctmgr.cH A D22-Dec-19948.6 KiB283191

jdhuff.cH A D22-Dec-199421.7 KiB688374

jdmainct.cH A D22-Dec-199420.5 KiB532270

jdmarker.cH A D22-Dec-199430.4 KiB1,053649

jdmaster.cH A D22-Dec-199422.9 KiB655422

jdmerge.cH A D22-Dec-199413.4 KiB389240

jdpostct.cH A D22-Dec-19948.8 KiB276171

jdsample.cH A D22-Dec-199416 KiB479277

jerror.cH A D22-Dec-19946.6 KiB229103

jerror.hH A D22-Dec-199412.1 KiB262214

jfdctflt.cH A D22-Dec-19945.4 KiB16986

jfdctfst.cH A D22-Dec-19947.4 KiB225104

jfdctint.cH A D22-Dec-199410.8 KiB284146

jidctflt.cH A D22-Dec-19948.2 KiB242129

jidctfst.cH A D22-Dec-199412.6 KiB363191

jidctint.cH A D22-Dec-199414.4 KiB389215

jidctred.cH A D22-Dec-199413.1 KiB398236

jinclude.hH A D22-Dec-19943.2 KiB9226

jmemansi.cH A D22-Dec-19944.5 KiB16886

jmemdos.cH A D22-Dec-199418.3 KiB635387

jmemdosa.asmH A D22-Dec-19948.1 KiB380355

jmemmgr.cH A D22-Dec-199438 KiB1,063601

jmemname.cH A D22-Dec-19947.9 KiB272141

jmemnobs.cH A D22-Dec-19942.7 KiB11049

jmemsys.hH A D22-Dec-19947.6 KiB18358

jmorecfg.hH A D22-Dec-199411.2 KiB340116

jpegint.hH A D22-Dec-199413.7 KiB362243

jpeglib.hH A D22-Dec-199437.2 KiB936431

jquant1.cH A D22-Dec-199427.6 KiB751427

jquant2.cH A D22-Dec-199445.1 KiB1,254729

jutils.cH A D22-Dec-19943.6 KiB13277

jversion.hH A D22-Dec-1994357 152

libjpeg.docH A D22-Dec-1994108.1 KiB2,1691,768

makcjpeg.stH A D22-Dec-19941.5 KiB3635

makdjpeg.stH A D22-Dec-19941.6 KiB3736

makefile.ansiH A D22-Dec-19949.3 KiB179127

makefile.bccH A D22-Dec-199410.8 KiB208148

makefile.cfgH A D22-Dec-199411.3 KiB240173

makefile.djH A D22-Dec-19949.7 KiB201144

makefile.manxH A D22-Dec-19949.2 KiB179126

makefile.mc6H A D22-Dec-199410.5 KiB197145

makefile.mmsH A D22-Dec-199410.2 KiB182139

makefile.sasH A D22-Dec-19949.8 KiB208149

makefile.unixH A D22-Dec-19949.6 KiB193136

makefile.vmsH A D22-Dec-19943.1 KiB105104

makljpeg.stH A D22-Dec-19943.6 KiB6261

makvms.optH A D22-Dec-1994210 54

rdbmp.cH A D22-Dec-199413.4 KiB437291

rdcolmap.cH A D22-Dec-19946.7 KiB254143

rdgif.cH A D22-Dec-199422 KiB677409

rdjpgcom.1H A D22-Dec-19941.2 KiB4544

rdjpgcom.cH A D22-Dec-199412.8 KiB476297

rdppm.cH A D22-Dec-199413.4 KiB451286

rdrle.cH A D22-Dec-199411.3 KiB388235

rdtarga.cH A D22-Dec-199414.6 KiB500318

structure.docH A D22-Dec-199445.9 KiB863701

testimg.ppmH A D22-Dec-199499.1 KiB44

usage.docH A D22-Dec-199420.7 KiB450356

wrbmp.cH A D22-Dec-199413.5 KiB441278

wrgif.cH A D22-Dec-199415.1 KiB501282

wrjpgcom.1H A D22-Dec-19942.5 KiB103102

wrjpgcom.cH A D22-Dec-199415.8 KiB575385

wrppm.cH A D22-Dec-19948.1 KiB269150

wrrle.cH A D22-Dec-19948.9 KiB303170

wrtarga.cH A D22-Dec-19947.3 KiB254151

README

1The Independent JPEG Group's JPEG software
2==========================================
3
4Note: 	Greyscale downsampling patch of 12/21 has been applied to
5	jdmaster.c and jcmaster.c.  --jhb
6
7
8README for release 5a of 7-Dec-94
9=================================
10
11This distribution contains the fifth public release of the Independent JPEG
12Group's free JPEG software.  You are welcome to redistribute this software and
13to use it for any purpose, subject to the conditions under LEGAL ISSUES, below.
14
15Serious users of this software (particularly those incorporating it into
16larger programs) should contact IJG at jpeg-info@uunet.uu.net to be added to
17our electronic mailing list.  Mailing list members are notified of updates
18and have a chance to participate in technical discussions, etc.
19
20This software is the work of Tom Lane, Philip Gladstone, Luis Ortiz, Jim
21Boucher, Lee Crocker, George Phillips, Davide Rossi, Ge' Weijers, and other
22members of the Independent JPEG Group.
23
24IJG is not associated with the official ISO JPEG standards committee.
25
26
27DOCUMENTATION ROADMAP
28=====================
29
30This file contains the following sections:
31
32OVERVIEW            General description of JPEG and the IJG software.
33LEGAL ISSUES        Copyright, lack of warranty, terms of distribution.
34REFERENCES          Where to learn more about JPEG.
35ARCHIVE LOCATIONS   Where to find newer versions of this software.
36RELATED SOFTWARE    Other stuff you should get.
37FILE FORMAT WARS    Software *not* to get.
38TO DO               Plans for future IJG releases.
39
40Other documentation files in the distribution are:
41
42User documentation:
43  install.doc       How to configure and install the IJG software.
44  usage.doc         Usage instructions for cjpeg, djpeg, rdjpgcom, wrjpgcom.
45  *.1               Unix-style man pages for programs (same info as usage.doc).
46  change.log        Version-to-version change highlights.
47Programmer and internal documentation:
48  libjpeg.doc       How to use the JPEG library in your own programs.
49  example.c         Sample code for calling the JPEG library.
50  structure.doc     Overview of the JPEG library's internal structure.
51  filelist.doc      Road map of IJG files.
52  coderules.doc     Coding style rules --- please read if you contribute code.
53
54Please read at least the files install.doc and usage.doc.  Useful information
55can also be found in the JPEG FAQ (Frequently Asked Questions) article.  See
56ARCHIVE LOCATIONS below to find out where to obtain the FAQ article.
57
58If you want to understand how the JPEG code works, we suggest reading one or
59more of the REFERENCES, then looking at the documentation files (in roughly
60the order listed) before diving into the code.
61
62
63OVERVIEW
64========
65
66This package contains C software to implement JPEG image compression and
67decompression.  JPEG (pronounced "jay-peg") is a standardized compression
68method for full-color and gray-scale images.  JPEG is intended for compressing
69"real-world" scenes; cartoons and other non-realistic images are not its
70strong suit.  JPEG is lossy, meaning that the output image is not necessarily
71identical to the input image.  Hence you must not use JPEG if you have to have
72identical output bits.  However, on typical images of real-world scenes, very
73good compression levels can be obtained with no visible change, and amazingly
74high compression levels are possible if you can tolerate a low-quality image.
75For more details, see the references, or just experiment with various
76compression settings.
77
78We provide a set of library routines for reading and writing JPEG image files,
79plus two simple applications "cjpeg" and "djpeg", which use the library to
80perform conversion between JPEG and some other popular image file formats.
81The library is intended to be reused in other applications.
82
83This software implements JPEG baseline and extended-sequential compression
84processes.  Provision is made for supporting all variants of these processes,
85although some uncommon parameter settings aren't implemented yet.  For legal
86reasons, we are not distributing code for the arithmetic-coding process; see
87LEGAL ISSUES.  At present we have made no provision for supporting the
88progressive, hierarchical, or lossless processes defined in the standard.
89(Support for progressive mode may be offered in a future release.)
90
91In order to support file conversion and viewing software, we have included
92considerable functionality beyond the bare JPEG coding/decoding capability;
93for example, the color quantization modules are not strictly part of JPEG
94decoding, but they are essential for output to colormapped file formats or
95colormapped displays.  These extra functions can be compiled out of the
96library if not required for a particular application.  We have also included
97two simple applications for inserting and extracting textual comments in
98JFIF files.
99
100The emphasis in designing this software has been on achieving portability and
101flexibility, while also making it fast enough to be useful.  In particular,
102the software is not intended to be read as a tutorial on JPEG.  (See the
103REFERENCES section for introductory material.)  While we hope that the entire
104package will someday be industrial-strength code, much remains to be done in
105performance tuning and in improving the capabilities of individual modules.
106
107We welcome the use of this software as a component of commercial products.
108No royalty is required, but we do ask for an acknowledgement in product
109documentation, as described under LEGAL ISSUES.
110
111
112LEGAL ISSUES
113============
114
115In plain English:
116
1171. We don't promise that this software works.  (But if you find any bugs,
118   please let us know!)
1192. You can use this software for whatever you want.  You don't have to pay us.
1203. You may not pretend that you wrote this software.  If you use it in a
121   program, you must acknowledge somewhere in your documentation that
122   you've used the IJG code.
123
124In legalese:
125
126The authors make NO WARRANTY or representation, either express or implied,
127with respect to this software, its quality, accuracy, merchantability, or
128fitness for a particular purpose.  This software is provided "AS IS", and you,
129its user, assume the entire risk as to its quality and accuracy.
130
131This software is copyright (C) 1991, 1992, 1993, 1994, Thomas G. Lane.
132All Rights Reserved except as specified below.
133
134Permission is hereby granted to use, copy, modify, and distribute this
135software (or portions thereof) for any purpose, without fee, subject to these
136conditions:
137(1) If any part of the source code for this software is distributed, then this
138README file must be included, with this copyright and no-warranty notice
139unaltered; and any additions, deletions, or changes to the original files
140must be clearly indicated in accompanying documentation.
141(2) If only executable code is distributed, then the accompanying
142documentation must state that "this software is based in part on the work of
143the Independent JPEG Group".
144(3) Permission for use of this software is granted only if the user accepts
145full responsibility for any undesirable consequences; the authors accept
146NO LIABILITY for damages of any kind.
147
148These conditions apply to any software derived from or based on the IJG code,
149not just to the unmodified library.  If you use our work, you ought to
150acknowledge us.
151
152Permission is NOT granted for the use of any IJG author's name or company name
153in advertising or publicity relating to this software or products derived from
154it.  This software may be referred to only as "the Independent JPEG Group's
155software".
156
157We specifically permit and encourage the use of this software as the basis of
158commercial products, provided that all warranty or liability claims are
159assumed by the product vendor.
160
161
162ansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
163sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
164ansi2knr.c is NOT covered by the above copyright and conditions, but instead
165by the usual distribution terms of the Free Software Foundation; principally,
166that you must include source code if you redistribute it.  (See the file
167ansi2knr.c for full details.)  However, since ansi2knr.c is not needed as part
168of any program generated from the IJG code, this does not limit you more than
169the foregoing paragraphs do.
170
171The configuration script "configure" was produced with GNU Autoconf.  It
172is copyright by the Free Software Foundation but is freely distributable.
173
174It appears that the arithmetic coding option of the JPEG spec is covered by
175patents owned by IBM, AT&T, and Mitsubishi.  Hence arithmetic coding cannot
176legally be used without obtaining one or more licenses.  For this reason,
177support for arithmetic coding has been removed from the free JPEG software.
178(Since arithmetic coding provides only a marginal gain over the unpatented
179Huffman mode, it is unlikely that very many implementations will support it.)
180So far as we are aware, there are no patent restrictions on the remaining
181code.
182
183We are required to state that
184    "The Graphics Interchange Format(c) is the Copyright property of
185    CompuServe Incorporated.  GIF(sm) is a Service Mark property of
186    CompuServe Incorporated."
187
188
189REFERENCES
190==========
191
192We highly recommend reading one or more of these references before trying to
193understand the innards of the JPEG software.
194
195The best short technical introduction to the JPEG compression algorithm is
196	Wallace, Gregory K.  "The JPEG Still Picture Compression Standard",
197	Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44.
198(Adjacent articles in that issue discuss MPEG motion picture compression,
199applications of JPEG, and related topics.)  If you don't have the CACM issue
200handy, a PostScript file containing a revised version of Wallace's article
201is available at ftp.uu.net, graphics/jpeg/wallace.ps.gz.  The file (actually
202a preprint for an article that appeared in IEEE Trans. Consumer Electronics)
203omits the sample images that appeared in CACM, but it includes corrections
204and some added material.  Note: the Wallace article is copyright ACM and
205IEEE, and it may not be used for commercial purposes.
206
207A somewhat less technical, more leisurely introduction to JPEG can be found in
208"The Data Compression Book" by Mark Nelson, published by M&T Books (Redwood
209City, CA), 1991, ISBN 1-55851-216-0.  This book provides good explanations and
210example C code for a multitude of compression methods including JPEG.  It is
211an excellent source if you are comfortable reading C code but don't know much
212about data compression in general.  The book's JPEG sample code is far from
213industrial-strength, but when you are ready to look at a full implementation,
214you've got one here...
215
216The best full description of JPEG is the textbook "JPEG Still Image Data
217Compression Standard" by William B. Pennebaker and Joan L. Mitchell, published
218by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1.  Price US$59.95, 638 pp.
219The book includes the complete text of the ISO JPEG standards (DIS 10918-1
220and draft DIS 10918-2).  This is by far the most complete exposition of JPEG
221in existence, and we highly recommend it.
222
223The JPEG standard itself is not available electronically; you must order a
224paper copy through ISO.  (Unless you feel a need to own a certified official
225copy, we recommend buying the Pennebaker and Mitchell book instead; it's much
226cheaper and includes a great deal of useful explanatory material.)  In the US,
227copies of the standard may be ordered from ANSI Sales at (212) 642-4900, or
228from Global Engineering Documents at (800) 854-7179.  (ANSI doesn't take
229credit card orders, but Global does.)  It's not cheap: as of 1992, ANSI was
230charging $95 for Part 1 and $47 for Part 2, plus 7% shipping/handling.  The
231standard is divided into two parts, Part 1 being the actual specification,
232while Part 2 covers compliance testing methods.  Part 1 is titled "Digital
233Compression and Coding of Continuous-tone Still Images, Part 1: Requirements
234and guidelines" and has document number ISO/IEC IS 10918-1.  As of mid-1994,
235Part 2 is still at Draft International Standard status.  It is titled "Digital
236Compression and Coding of Continuous-tone Still Images, Part 2: Compliance
237testing" and has document number ISO/IEC DIS 10918-2.  (The document number
238will change to IS 10918-2 when final approval is obtained.)  A Part 3,
239covering extensions, is likely to appear in draft form in late 1994.
240
241The JPEG standard does not specify all details of an interchangeable file
242format.  For the omitted details we follow the "JFIF" conventions, revision
2431.02.  A copy of the JFIF spec is available from:
244	Literature Department
245	C-Cube Microsystems, Inc.
246	1778 McCarthy Blvd.
247	Milpitas, CA 95035
248	phone (408) 944-6300,  fax (408) 944-6314
249A PostScript version of this document is available at ftp.uu.net, file
250graphics/jpeg/jfif.ps.gz.  It can also be obtained by e-mail from the C-Cube
251mail server, netlib@c3.pla.ca.us.  Send the message "send jfif_ps from jpeg"
252to the server to obtain the JFIF document; send the message "help" if you have
253trouble.
254
255The TIFF 6.0 file format specification can be obtained by FTP from sgi.com
256(192.48.153.1), file graphics/tiff/TIFF6.ps.Z; or you can order a printed copy
257from Aldus Corp. at (206) 628-6593.  It should be noted that the TIFF 6.0 spec
258of 3-June-92 has a number of serious problems in its JPEG features.  A
259redesign effort is currently underway to correct these problems; it is
260expected to result in a new, incompatible, spec.  IJG intends to support the
261corrected version of TIFF when the new spec is issued.
262
263
264ARCHIVE LOCATIONS
265=================
266
267The "official" archive site for this software is ftp.uu.net (Internet
268address 192.48.96.9).  The most recent released version can always be found
269there in directory graphics/jpeg.  This particular version will be archived
270as graphics/jpeg/jpegsrc.v5a.tar.gz.  If you are on the Internet, you
271can retrieve files from ftp.uu.net by standard anonymous FTP.  If you don't
272have FTP access, UUNET's archives are also available via UUCP; contact
273help@uunet.uu.net for information on retrieving files that way.
274
275Numerous Internet sites maintain copies of the UUNET files; in particular,
276you can probably find a copy at any site that archives comp.sources.misc
277submissions.  However, only ftp.uu.net is guaranteed to have the latest
278official version.
279
280You can also obtain this software from CompuServe, in the GRAPHSUPPORT
281forum (GO GRAPHSUP), probably in library 15 (there are rumors of a pending
282reorganization there).  Again, CompuServe is not guaranteed to have the
283very latest version.
284
285The JPEG FAQ (Frequently Asked Questions) article is a useful source of
286general information about JPEG.  It is updated constantly and therefore is
287not included in this distribution.  The FAQ is posted every two weeks to
288Usenet newsgroups comp.graphics, news.answers, and other groups.  You can
289always obtain the latest version from the news.answers archive at
290rtfm.mit.edu.  By FTP, fetch /pub/usenet/news.answers/jpeg-faq/part1 and
291.../part2.  If you don't have FTP, send e-mail to mail-server@rtfm.mit.edu
292with body
293	send usenet/news.answers/jpeg-faq/part1
294	send usenet/news.answers/jpeg-faq/part2
295
296
297RELATED SOFTWARE
298================
299
300Numerous viewing and image manipulation programs now support JPEG.  (Quite a
301few of them use this library to do so.)  The JPEG FAQ described above lists
302some of the more popular free and shareware viewers, and tells where to
303obtain them on Internet.
304
305If you are on a Unix machine, we highly recommend Jef Poskanzer's free
306PBMPLUS image software, which provides many useful operations on PPM-format
307image files.  In particular, it can convert PPM images to and from a wide
308range of other formats.  You can obtain this package by FTP from ftp.x.org
309(contrib/pbmplus*.tar.Z) or ftp.ee.lbl.gov (pbmplus*.tar.Z).  There is also
310a newer update of this package called NETPBM, available from
311wuarchive.wustl.edu under directory /graphics/graphics/packages/NetPBM/.
312Unfortunately PBMPLUS/NETPBM is not nearly as portable as the IJG software
313is; you are likely to have difficulty making it work on any non-Unix machine.
314
315A different free JPEG implementation, written by the PVRG group at Stanford,
316is available from havefun.stanford.edu in directory pub/jpeg.  This program
317is designed for research and experimentation rather than production use;
318it is slower, harder to use, and less portable than the IJG code, but it
319implements a larger subset of the JPEG standard.  In particular, it supports
320lossless JPEG.
321
322
323FILE FORMAT WARS
324================
325
326Some JPEG programs produce files that are not compatible with our library.
327The root of the problem is that the ISO JPEG committee failed to specify a
328concrete file format.  Some vendors "filled in the blanks" on their own,
329creating proprietary formats that no one else could read.  (For example, none
330of the early commercial JPEG implementations for the Macintosh were able to
331exchange compressed files.)
332
333The file format we have adopted is called JFIF (see REFERENCES).  This format
334has been agreed to by a number of major commercial JPEG vendors, and it has
335become the de facto standard.  JFIF is a minimal or "low end" representation.
336Work is also going forward to incorporate JPEG compression into the TIFF
337standard, for use in "high end" applications that need to record a lot of
338additional data about an image.  We intend to support TIFF in the future.
339We hope that these two formats will be sufficient and that other,
340incompatible JPEG file formats will not proliferate.
341
342Indeed, part of the reason for developing and releasing this free software is
343to help force rapid convergence to de facto standards for JPEG file formats.
344SUPPORT STANDARD, NON-PROPRIETARY FORMATS: demand JFIF or TIFF/JPEG!
345
346
347TO DO
348=====
349
350In future versions, we are considering supporting progressive JPEG
351compression, the upcoming JPEG Part 3 extensions, and other improvements.
352
353As always, speeding things up is high on our priority list.
354
355Please send bug reports, offers of help, etc. to jpeg-info@uunet.uu.net.
356