Cross Reference: /solaris-userland/components/desktop/libjpeg/libjpeg.license
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
5620N/ACopyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
5620N/A
5620N/AREADME content (required to be distributed if any of the JPEG source code is distributed)
5620N/A--------------------------------------------------------------------------------
5620N/A
5620N/A
5620N/AThe Independent JPEG Group's JPEG software
5620N/A==========================================
5620N/A
5620N/AREADME for release 6b of 27-Mar-1998
5620N/A====================================
5620N/A
5620N/AThis distribution contains the sixth public release of the Independent JPEG
5620N/AGroup's free JPEG software. You are welcome to redistribute this software and
5620N/Ato use it for any purpose, subject to the conditions under LEGAL ISSUES, below.
5620N/A
5620N/ASerious users of this software (particularly those incorporating it into
5620N/Alarger programs) should contact IJG at jpeg-info@uunet.uu.net to be added to
5620N/Aour electronic mailing list. Mailing list members are notified of updates
5620N/Aand have a chance to participate in technical discussions, etc.
5620N/A
5620N/AThis software is the work of Tom Lane, Philip Gladstone, Jim Boucher,
5620N/ALee Crocker, Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi,
5620N/AGuido Vollbeding, Ge' Weijers, and other members of the Independent JPEG
5620N/AGroup.
5620N/A
5620N/AIJG is not affiliated with the official ISO JPEG standards committee.
5620N/A
5620N/A
5620N/ADOCUMENTATION ROADMAP
5620N/A=====================
5620N/A
5620N/AThis file contains the following sections:
5620N/A
5620N/AOVERVIEW General description of JPEG and the IJG software.
5620N/ALEGAL ISSUES Copyright, lack of warranty, terms of distribution.
5620N/AREFERENCES Where to learn more about JPEG.
5620N/AARCHIVE LOCATIONS Where to find newer versions of this software.
5620N/ARELATED SOFTWARE Other stuff you should get.
5620N/AFILE FORMAT WARS Software *not* to get.
5620N/ATO DO Plans for future IJG releases.
5620N/A
5620N/AOther documentation files in the distribution are:
5620N/A
5620N/AUser documentation:
5620N/A install.doc How to configure and install the IJG software.
5620N/A usage.doc Usage instructions for cjpeg, djpeg, jpegtran,
5620N/A rdjpgcom, and wrjpgcom.
5620N/A *.1 Unix-style man pages for programs (same info as usage.doc).
5620N/A wizard.doc Advanced usage instructions for JPEG wizards only.
5620N/A change.log Version-to-version change highlights.
5620N/AProgrammer and internal documentation:
5620N/A libjpeg.doc How to use the JPEG library in your own programs.
5620N/A example.c Sample code for calling the JPEG library.
5620N/A structure.doc Overview of the JPEG library's internal structure.
5620N/A filelist.doc Road map of IJG files.
5620N/A coderules.doc Coding style rules --- please read if you contribute code.
5620N/A
5620N/APlease read at least the files install.doc and usage.doc. Useful information
5620N/Acan also be found in the JPEG FAQ (Frequently Asked Questions) article. See
5620N/AARCHIVE LOCATIONS below to find out where to obtain the FAQ article.
5620N/A
5620N/AIf you want to understand how the JPEG code works, we suggest reading one or
5620N/Amore of the REFERENCES, then looking at the documentation files (in roughly
5620N/Athe order listed) before diving into the code.
5620N/A
5620N/A
5620N/AOVERVIEW
5620N/A========
5620N/A
5620N/AThis package contains C software to implement JPEG image compression and
5620N/Adecompression. JPEG (pronounced "jay-peg") is a standardized compression
5620N/Amethod for full-color and gray-scale images. JPEG is intended for compressing
5620N/A"real-world" scenes; line drawings, cartoons and other non-realistic images
5620N/Aare not its strong suit. JPEG is lossy, meaning that the output image is not
5620N/Aexactly identical to the input image. Hence you must not use JPEG if you
5620N/Ahave to have identical output bits. However, on typical photographic images,
5620N/Avery good compression levels can be obtained with no visible change, and
5620N/Aremarkably high compression levels are possible if you can tolerate a
5620N/Alow-quality image. For more details, see the references, or just experiment
5620N/Awith various compression settings.
5620N/A
5620N/AThis software implements JPEG baseline, extended-sequential, and progressive
5620N/Acompression processes. Provision is made for supporting all variants of these
5620N/Aprocesses, although some uncommon parameter settings aren't implemented yet.
5620N/AFor legal reasons, we are not distributing code for the arithmetic-coding
5620N/Avariants of JPEG; see LEGAL ISSUES. We have made no provision for supporting
5620N/Athe hierarchical or lossless processes defined in the standard.
5620N/A
5620N/AWe provide a set of library routines for reading and writing JPEG image files,
5620N/Aplus two sample applications "cjpeg" and "djpeg", which use the library to
5620N/Aperform conversion between JPEG and some other popular image file formats.
5620N/AThe library is intended to be reused in other applications.
5620N/A
5620N/AIn order to support file conversion and viewing software, we have included
5620N/Aconsiderable functionality beyond the bare JPEG coding/decoding capability;
5620N/Afor example, the color quantization modules are not strictly part of JPEG
5620N/Adecoding, but they are essential for output to colormapped file formats or
5620N/Acolormapped displays. These extra functions can be compiled out of the
5620N/Alibrary if not required for a particular application. We have also included
5620N/A"jpegtran", a utility for lossless transcoding between different JPEG
5620N/Aprocesses, and "rdjpgcom" and "wrjpgcom", two simple applications for
5620N/Ainserting and extracting textual comments in JFIF files.
5620N/A
5620N/AThe emphasis in designing this software has been on achieving portability and
5620N/Aflexibility, while also making it fast enough to be useful. In particular,
5620N/Athe software is not intended to be read as a tutorial on JPEG. (See the
5620N/AREFERENCES section for introductory material.) Rather, it is intended to
5620N/Abe reliable, portable, industrial-strength code. We do not claim to have
5620N/Aachieved that goal in every aspect of the software, but we strive for it.
5620N/A
5620N/AWe welcome the use of this software as a component of commercial products.
5620N/ANo royalty is required, but we do ask for an acknowledgement in product
5620N/Adocumentation, as described under LEGAL ISSUES.
5620N/A
5620N/A
5620N/ALEGAL ISSUES
5620N/A============
5620N/A
5620N/AIn plain English:
5620N/A
5620N/A1. We don't promise that this software works. (But if you find any bugs,
5620N/A please let us know!)
5620N/A2. You can use this software for whatever you want. You don't have to pay us.
5620N/A3. You may not pretend that you wrote this software. If you use it in a
5620N/A program, you must acknowledge somewhere in your documentation that
5620N/A you've used the IJG code.
5620N/A
5620N/AIn legalese:
5620N/A
5620N/AThe authors make NO WARRANTY or representation, either express or implied,
5620N/Awith respect to this software, its quality, accuracy, merchantability, or
5620N/Afitness for a particular purpose. This software is provided "AS IS", and you,
5620N/Aits user, assume the entire risk as to its quality and accuracy.
5620N/A
5620N/AThis software is copyright (C) 1991-1998, Thomas G. Lane.
5620N/AAll Rights Reserved except as specified below.
5620N/A
5620N/APermission is hereby granted to use, copy, modify, and distribute this
5620N/Asoftware (or portions thereof) for any purpose, without fee, subject to these
5620N/Aconditions:
5620N/A(1) If any part of the source code for this software is distributed, then this
5620N/AREADME file must be included, with this copyright and no-warranty notice
5620N/Aunaltered; and any additions, deletions, or changes to the original files
5620N/Amust be clearly indicated in accompanying documentation.
5620N/A(2) If only executable code is distributed, then the accompanying
5620N/Adocumentation must state that "this software is based in part on the work of
5620N/Athe Independent JPEG Group".
5620N/A(3) Permission for use of this software is granted only if the user accepts
5620N/Afull responsibility for any undesirable consequences; the authors accept
5620N/ANO LIABILITY for damages of any kind.
5620N/A
5620N/AThese conditions apply to any software derived from or based on the IJG code,
5620N/Anot just to the unmodified library. If you use our work, you ought to
5620N/Aacknowledge us.
5620N/A
5620N/APermission is NOT granted for the use of any IJG author's name or company name
5620N/Ain advertising or publicity relating to this software or products derived from
5620N/Ait. This software may be referred to only as "the Independent JPEG Group's
5620N/Asoftware".
5620N/A
5620N/AWe specifically permit and encourage the use of this software as the basis of
5620N/Acommercial products, provided that all warranty or liability claims are
5620N/Aassumed by the product vendor.
5620N/A
5620N/A
5620N/Aansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
5620N/Asole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
5620N/Aansi2knr.c is NOT covered by the above copyright and conditions, but instead
5620N/Aby the usual distribution terms of the Free Software Foundation; principally,
5620N/Athat you must include source code if you redistribute it. (See the file
5620N/Aansi2knr.c for full details.) However, since ansi2knr.c is not needed as part
5620N/Aof any program generated from the IJG code, this does not limit you more than
5620N/Athe foregoing paragraphs do.
5620N/A
5620N/AThe Unix configuration script "configure" was produced with GNU Autoconf.
5620N/AIt is copyright by the Free Software Foundation but is freely distributable.
5620N/AThe same holds for its supporting scripts (config.guess, config.sub,
5620N/Altconfig, ltmain.sh). Another support script, install-sh, is copyright
5620N/Aby M.I.T. but is also freely distributable.
5620N/A
5620N/AIt appears that the arithmetic coding option of the JPEG spec is covered by
5620N/Apatents owned by IBM, AT&T, and Mitsubishi. Hence arithmetic coding cannot
5620N/Alegally be used without obtaining one or more licenses. For this reason,
5620N/Asupport for arithmetic coding has been removed from the free JPEG software.
5620N/A(Since arithmetic coding provides only a marginal gain over the unpatented
5620N/AHuffman mode, it is unlikely that very many implementations will support it.)
5620N/ASo far as we are aware, there are no patent restrictions on the remaining
5620N/Acode.
5620N/A
5620N/AThe IJG distribution formerly included code to read and write GIF files.
5620N/ATo avoid entanglement with the Unisys LZW patent, GIF reading support has
5620N/Abeen removed altogether, and the GIF writer has been simplified to produce
5620N/A"uncompressed GIFs". This technique does not use the LZW algorithm; the
5620N/Aresulting GIF files are larger than usual, but are readable by all standard
5620N/AGIF decoders.
5620N/A
5620N/AWe are required to state that
5620N/A "The Graphics Interchange Format(c) is the Copyright property of
5620N/A CompuServe Incorporated. GIF(sm) is a Service Mark property of
5620N/A CompuServe Incorporated."
5620N/A
5620N/A
5620N/AREFERENCES
5620N/A==========
5620N/A
5620N/AWe highly recommend reading one or more of these references before trying to
5620N/Aunderstand the innards of the JPEG software.
5620N/A
5620N/AThe best short technical introduction to the JPEG compression algorithm is
5620N/A Wallace, Gregory K. "The JPEG Still Picture Compression Standard",
5620N/A Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44.
5620N/A(Adjacent articles in that issue discuss MPEG motion picture compression,
5620N/Aapplications of JPEG, and related topics.) If you don't have the CACM issue
5620N/Ahandy, a PostScript file containing a revised version of Wallace's article is
5620N/Aavailable at ftp://ftp.uu.net/graphics/jpeg/wallace.ps.gz. The file (actually
5620N/Aa preprint for an article that appeared in IEEE Trans. Consumer Electronics)
5620N/Aomits the sample images that appeared in CACM, but it includes corrections
5620N/Aand some added material. Note: the Wallace article is copyright ACM and IEEE,
5620N/Aand it may not be used for commercial purposes.
5620N/A
5620N/AA somewhat less technical, more leisurely introduction to JPEG can be found in
5620N/A"The Data Compression Book" by Mark Nelson and Jean-loup Gailly, published by
5620N/AM&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1. This book provides
5620N/Agood explanations and example C code for a multitude of compression methods
5620N/Aincluding JPEG. It is an excellent source if you are comfortable reading C
5620N/Acode but don't know much about data compression in general. The book's JPEG
5620N/Asample code is far from industrial-strength, but when you are ready to look
5620N/Aat a full implementation, you've got one here...
5620N/A
5620N/AThe best full description of JPEG is the textbook "JPEG Still Image Data
5620N/ACompression Standard" by William B. Pennebaker and Joan L. Mitchell, published
5620N/Aby Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1. Price US$59.95, 638 pp.
5620N/AThe book includes the complete text of the ISO JPEG standards (DIS 10918-1
5620N/Aand draft DIS 10918-2). This is by far the most complete exposition of JPEG
5620N/Ain existence, and we highly recommend it.
5620N/A
5620N/AThe JPEG standard itself is not available electronically; you must order a
5620N/Apaper copy through ISO or ITU. (Unless you feel a need to own a certified
5620N/Aofficial copy, we recommend buying the Pennebaker and Mitchell book instead;
5620N/Ait's much cheaper and includes a great deal of useful explanatory material.)
5620N/AIn the USA, copies of the standard may be ordered from ANSI Sales at (212)
5620N/A642-4900, or from Global Engineering Documents at (800) 854-7179. (ANSI
5620N/Adoesn't take credit card orders, but Global does.) It's not cheap: as of
5620N/A1992, ANSI was charging $95 for Part 1 and $47 for Part 2, plus 7%
5620N/Ashipping/handling. The standard is divided into two parts, Part 1 being the
5620N/Aactual specification, while Part 2 covers compliance testing methods. Part 1
5620N/Ais titled "Digital Compression and Coding of Continuous-tone Still Images,
5620N/APart 1: Requirements and guidelines" and has document numbers ISO/IEC IS
5620N/A10918-1, ITU-T T.81. Part 2 is titled "Digital Compression and Coding of
5620N/AContinuous-tone Still Images, Part 2: Compliance testing" and has document
5620N/Anumbers ISO/IEC IS 10918-2, ITU-T T.83.
5620N/A
5620N/ASome extensions to the original JPEG standard are defined in JPEG Part 3,
5620N/Aa newer ISO standard numbered ISO/IEC IS 10918-3 and ITU-T T.84. IJG
5620N/Acurrently does not support any Part 3 extensions.
5620N/A
5620N/AThe JPEG standard does not specify all details of an interchangeable file
5620N/Aformat. For the omitted details we follow the "JFIF" conventions, revision
5620N/A1.02. A copy of the JFIF spec is available from:
5620N/A Literature Department
5620N/A C-Cube Microsystems, Inc.
5620N/A 1778 McCarthy Blvd.
5620N/A Milpitas, CA 95035
5620N/A phone (408) 944-6300, fax (408) 944-6314
5620N/AA PostScript version of this document is available by FTP at
5620N/Aftp://ftp.uu.net/graphics/jpeg/jfif.ps.gz. There is also a plain text
5620N/Aversion at ftp://ftp.uu.net/graphics/jpeg/jfif.txt.gz, but it is missing
5620N/Athe figures.
5620N/A
5620N/AThe TIFF 6.0 file format specification can be obtained by FTP from
5620N/Aftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz. The JPEG incorporation scheme
5620N/Afound in the TIFF 6.0 spec of 3-June-92 has a number of serious problems.
5620N/AIJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6).
5620N/AInstead, we recommend the JPEG design proposed by TIFF Technical Note #2
5620N/A(Compression tag 7). Copies of this Note can be obtained from ftp.sgi.com or
5620N/Afrom ftp://ftp.uu.net/graphics/jpeg/. It is expected that the next revision
5620N/Aof the TIFF spec will replace the 6.0 JPEG design with the Note's design.
5620N/AAlthough IJG's own code does not support TIFF/JPEG, the free libtiff library
5620N/Auses our library to implement TIFF/JPEG per the Note. libtiff is available
5620N/Afrom ftp://ftp.sgi.com/graphics/tiff/.
5620N/A
5620N/A
5620N/AARCHIVE LOCATIONS
5620N/A=================
5620N/A
5620N/AThe "official" archive site for this software is ftp.uu.net (Internet
5620N/Aaddress 192.48.96.9). The most recent released version can always be found
5620N/Athere in directory graphics/jpeg. This particular version will be archived
5620N/Aas ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz. If you don't have
5620N/Adirect Internet access, UUNET's archives are also available via UUCP; contact
5620N/Ahelp@uunet.uu.net for information on retrieving files that way.
5620N/A
5620N/ANumerous Internet sites maintain copies of the UUNET files. However, only
5620N/Aftp.uu.net is guaranteed to have the latest official version.
5620N/A
5620N/AYou can also obtain this software in DOS-compatible "zip" archive format from
5620N/Athe SimTel archives (ftp://ftp.simtel.net/pub/simtelnet/msdos/graphics/), or
5620N/Aon CompuServe in the Graphics Support forum (GO CIS:GRAPHSUP), library 12
5620N/A"JPEG Tools". Again, these versions may sometimes lag behind the ftp.uu.net
5620N/Arelease.
5620N/A
5620N/AThe JPEG FAQ (Frequently Asked Questions) article is a useful source of
5620N/Ageneral information about JPEG. It is updated constantly and therefore is
5620N/Anot included in this distribution. The FAQ is posted every two weeks to
5620N/AUsenet newsgroups comp.graphics.misc, news.answers, and other groups.
5620N/AIt is available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/
5620N/Aand other news.answers archive sites, including the official news.answers
5620N/Aarchive at rtfm.mit.edu: ftp://rtfm.mit.edu/pub/usenet/news.answers/jpeg-faq/.
5620N/AIf you don't have Web or FTP access, send e-mail to mail-server@rtfm.mit.edu
5620N/Awith body
5620N/A send usenet/news.answers/jpeg-faq/part1
5620N/A send usenet/news.answers/jpeg-faq/part2
5620N/A
5620N/A
5620N/ARELATED SOFTWARE
5620N/A================
5620N/A
5620N/ANumerous viewing and image manipulation programs now support JPEG. (Quite a
5620N/Afew of them use this library to do so.) The JPEG FAQ described above lists
5620N/Asome of the more popular free and shareware viewers, and tells where to
5620N/Aobtain them on Internet.
5620N/A
5620N/AIf you are on a Unix machine, we highly recommend Jef Poskanzer's free
5620N/APBMPLUS software, which provides many useful operations on PPM-format image
5620N/Afiles. In particular, it can convert PPM images to and from a wide range of
5620N/Aother formats, thus making cjpeg/djpeg considerably more useful. The latest
5620N/Aversion is distributed by the NetPBM group, and is available from numerous
5620N/Asites, notably ftp://wuarchive.wustl.edu/graphics/graphics/packages/NetPBM/.
5620N/AUnfortunately PBMPLUS/NETPBM is not nearly as portable as the IJG software is;
5620N/Ayou are likely to have difficulty making it work on any non-Unix machine.
5620N/A
5620N/AA different free JPEG implementation, written by the PVRG group at Stanford,
5620N/Ais available from ftp://havefun.stanford.edu/pub/jpeg/. This program
5620N/Ais designed for research and experimentation rather than production use;
5620N/Ait is slower, harder to use, and less portable than the IJG code, but it
5620N/Ais easier to read and modify. Also, the PVRG code supports lossless JPEG,
5620N/Awhich we do not. (On the other hand, it doesn't do progressive JPEG.)
5620N/A
5620N/A
5620N/AFILE FORMAT WARS
5620N/A================
5620N/A
5620N/ASome JPEG programs produce files that are not compatible with our library.
5620N/AThe root of the problem is that the ISO JPEG committee failed to specify a
5620N/Aconcrete file format. Some vendors "filled in the blanks" on their own,
5620N/Acreating proprietary formats that no one else could read. (For example, none
5620N/Aof the early commercial JPEG implementations for the Macintosh were able to
5620N/Aexchange compressed files.)
5620N/A
5620N/AThe file format we have adopted is called JFIF (see REFERENCES). This format
5620N/Ahas been agreed to by a number of major commercial JPEG vendors, and it has
5620N/Abecome the de facto standard. JFIF is a minimal or "low end" representation.
5620N/AWe recommend the use of TIFF/JPEG (TIFF revision 6.0 as modified by TIFF
5620N/ATechnical Note #2) for "high end" applications that need to record a lot of
5620N/Aadditional data about an image. TIFF/JPEG is fairly new and not yet widely
5620N/Asupported, unfortunately.
5620N/A
5620N/AThe upcoming JPEG Part 3 standard defines a file format called SPIFF.
5620N/ASPIFF is interoperable with JFIF, in the sense that most JFIF decoders should
5620N/Abe able to read the most common variant of SPIFF. SPIFF has some technical
5620N/Aadvantages over JFIF, but its major claim to fame is simply that it is an
5620N/Aofficial standard rather than an informal one. At this point it is unclear
5620N/Awhether SPIFF will supersede JFIF or whether JFIF will remain the de-facto
5620N/Astandard. IJG intends to support SPIFF once the standard is frozen, but we
5620N/Ahave not decided whether it should become our default output format or not.
5620N/A(In any case, our decoder will remain capable of reading JFIF indefinitely.)
5620N/A
5620N/AVarious proprietary file formats incorporating JPEG compression also exist.
5620N/AWe have little or no sympathy for the existence of these formats. Indeed,
5620N/Aone of the original reasons for developing this free software was to help
5620N/Aforce convergence on common, open format standards for JPEG files. Don't
5620N/Ause a proprietary file format!
5620N/A
5620N/A
5620N/ATO DO
5620N/A=====
5620N/A
5620N/AThe major thrust for v7 will probably be improvement of visual quality.
5620N/AThe current method for scaling the quantization tables is known not to be
5620N/Avery good at low Q values. We also intend to investigate block boundary
5620N/Asmoothing, "poor man's variable quantization", and other means of improving
5620N/Aquality-vs-file-size performance without sacrificing compatibility.
5620N/A
5620N/AIn future versions, we are considering supporting some of the upcoming JPEG
5620N/APart 3 extensions --- principally, variable quantization and the SPIFF file
5620N/Aformat.
5620N/A
5620N/AAs always, speeding things up is of great interest.
5620N/A
5620N/APlease send bug reports, offers of help, etc. to jpeg-info@uunet.uu.net.
5620N/A