The Independent JPEG Group‘s JPEG software

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

1998 年 3 月 27 日第 6b 版的自述文件
=====================================

此发行版包含独立 JPEG Group 的第六次公开发行的免费 JPEG 软件。欢迎您重新分发此软件和
根据以下法律问题的条件将其用于任何目的。

该软件的重度用户(尤其是那些将其纳入到较大程序的用户)应通过 jpeg-info@uunet.uu.net 联系 IJG 以便添加到我们的电子邮件列表。邮件列表成员会收到更新通知并有机会参与技术讨论等。

该软件是 Tom Lane、Philip Gladstone、Jim Boucher、李·克罗克、朱利安·明吉永、路易斯·奥尔蒂斯、乔治·菲利普斯、大卫·罗西、Guido Vollbeding、Ge'Weijers 和 Independent JPEG 的其他成员团体。

IJG 不隶属于官方 ISO JPEG 标准委员会。


文档路线图
======================

该文件包含以下部分:

概述                                     JPEG 和 IJG 软件的一般描述。
法律问题                              版权、缺乏保证、分发条款。
参考                                     哪里可以了解更多关于 JPEG 的信息。
存档位置                              在哪里可以找到该软件的较新版本。
相关软件                              你应该得到的其他东西。
FILE FORMAT WARS         软件*不*获得。
TO DO                                 未来 IJG 版本的计划。

发行版中的其他文档文件:

用户文档:
  install.doc                         如何配置和安装 IJG 软件。
  usage.doc                         cjpeg、djpeg、jpegtran、rdjpgcom 和 wrjpgcom的使用说明。
  *.1                                     Unix 风格的程序手册页(与usage.doc 相同的信息)。
  wizard.doc                        仅适用于 JPEG 向导的高级使用说明。
  change.log                        版本到版本的更改点。
程序员和内部文档:
  libjpeg.doc                        如何在您自己的程序中使用 JPEG 库。
  example.c                         调用 JPEG 库的示例代码。
  structure.doc                     JPEG 库内部结构的概述。
  filelist.doc                          IJG 文件的路线图。
  coderules.doc                   编码风格规则 --- 如果您贡献代码,请阅读。

请至少阅读文件 install.doc 和 usage.doc。有用的信息也可以在 JPEG FAQ(常见问题)文章中找到。看在下方存档位置以了解获取常见问题解答文章的位置。

如果您想了解 JPEG 代码的工作原理,我们建议您阅读参考资料中的一个或更多,然后查看文档文件(根据大致列出的顺序),然​​后再深入研究代码。

概述

========

该软件包包含 C 软件,用于实现 JPEG 图像压缩和解压缩。 JPEG(发音为“jay-peg”)是一种标准化压缩全彩色和灰度图像的方法。 JPEG用于压缩 “真实世界”场景;线条图、卡通和其他非现实图像不是它的强项。 JPEG 是有损的,这意味着输出图像不是与输入图像完全相同。因此,如果您想要和输入相同的输出字节,不应该使用JPEG。然而,在典型的摄影图像上,使用JPEG可以在没有明显变化的情况下获得非常好的压缩水平,并且如果你能容忍低质量的图像,使用JPEG可以获得一个非常高的压缩水平。有关更多详细信息,请参阅参考资料,或者是实验各种压缩参数设置。

该软件实现了 JPEG 基准、扩展顺序和渐进式的压缩过程。尽管一些不常见的参数设置尚未实现,该软件支持了这些的所有变体的处理方式。 出于法律原因,我们不分发算术编码方式的JPEG代码;见法律问题。我们没有提供支持标准中定义的分层或无损过程。

我们提供了一组用于读取和写入 JPEG 图像文件的库例程, 加上两个示例应用程序“cjpeg”和“djpeg”,它们使用该库来执行 JPEG 和其他一些流行的图像文件格式之间的转换。 该库旨在在其他应用程序中重用。 为了支持文件转换和查看软件,我们已经包括 除了单纯的 JPEG 编码/解码能力之外,还有相当多的功能; 例如,颜色量化模块并不是 JPEG 的严格组成部分 解码,但它们对于输出到彩色映射文件格式或 彩色映射显示。这些额外的函数可以编译出来 如果特定应用程序不需要库。我们还包括 “jpegtran”,用于在不同 JPEG 之间进行无损转码的实用程序 进程,以及“rdjpgcom”和“wrjpgcom”,两个简单的应用程序 在 JFIF 文件中插入和提取文本注释。

设计该软件的重点是实现可移植性和 灵活性,同时也使其足够快以备不时之需。特别是, 该软件不打算作为 JPEG 教程阅读。 (见 介绍性材料的参考部分。)相反,它旨在 是可靠、便携、工业强度的代码。我们不声称拥有 在软件的各个方面都实现了这一目标,但我们为之努力。 我们欢迎将此软件用作商业产品的组件。 不需要版税,但我们确实要求在产品中确认 文件,如法律问题中所述。

法律问题

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

简而言之:

1. 我们不保证此软件有效。 (但如果你发现任何错误, 请告诉我们!)

2. 你可以用这个软件做任何你想做的事。您不必付钱给我们。

3. 你不能假装这个软件是你写的。如果你在一个 程序,您必须在文档中的某处确认 您使用了 IJG 代码。

用法律术语:

作者不作任何明示或暗示的保证或陈述, 关于本软件,其质量、准确性、适销性或 适合特定目的。本软件按“原样”提供,您, 其用户,承担其质量和准确性的全部风险。

本软件版权所有 (C) 1991-1998,Thomas G. Lane。 除以下规定外,保留所有权利。

特此授予使用、复制、修改和分发本 软件(或其部分)用于任何目的,免费,受这些 条件:

(1) 如果该软件的源代码的任何部分被分发,那么这个 README 文件必须包含在此版权和无担保声明中 不变;以及对原始文件的任何添加、删除或更改 必须在随附文件中明确说明。

(2) 如果仅分发可执行代码,则随附的 文件必须说明“该软件部分基于 独立 JPEG 组”。

(3) 只有在用户接受的情况下才授予使用本软件的许可 对任何不良后果承担全部责任;作者接受 对任何形式的损害不承担任何责任。

这些条件适用于任何源自或基于 IJG 代码的软件, 不仅仅是未修改的库。如果您使用我们的工作,您应该 承认我们。

不允许使用任何 IJG 作者的姓名或公司名称 在与此软件或产品相关的广告或宣传中 它。此软件可能仅被称为“独立 JPEG 集团的 软件”。

我们特别允许并鼓励使用此软件作为 商业产品,前提是所有保修或责任索赔 由产品供应商承担。

ansi2knr.c 经 L. Peter Deutsch 许可包含在此发行版中, 其版权持有人,加利福尼亚州门洛帕克的阿拉丁企业的独资经营者。 ansi2knr.c 不受上述版权和条件的保护,而是 根据自由软件基金会的通常分发条款;原则上, 如果您重新分发它,则必须包含源代码。 (见文件 ansi2knr.c 以获得完整的详细信息。)但是,由于不需要 ansi2knr.c 作为一部分 从 IJG 代码生成的任何程序中,这不会限制您超过 上述段落确实如此。

Unix 配置脚本“configure”是用 GNU Autoconf 生成的。 它的版权归自由软件基金会所有,但可以自由分发。 它的支持脚本(config.guess、config.sub、 ltconfig,ltmain.sh)。另一个支持脚本 install-sh 受版权保护 由麻省理工学院但也可以自由分发。

JPEG规范的算术编码选项似乎由 IBM、AT&T 和三菱拥有的专利。因此算术编码不能 无需获得一个或多个许可证即可合法使用。为此原因, 免费 JPEG 软件已删除对算术编码的支持。 (因为算术编码只提供了比未专利技术的边际增益 霍夫曼模式,很多实现不太可能支持它。) 据我们所知,其余的没有专利限制 代码。

IJG 发行版以前包含用于读取和写入 GIF 文件的代码。 为避免与 Unisys LZW 专利的纠葛,GIF 阅读支持有 被完全删除,GIF 编写器已被简化为生成 “未压缩的 GIF”。该技术不使用 LZW 算法;这 生成的 GIF 文件比平时大,但所有标准都可以读取 GIF 解码器。 我们必须声明 “图形交换格式 (c) 是 CompuServe 公司。 GIF(sm) 是 CompuServe 公司。”

参考

==========

我们强烈建议您在尝试阅读这些参考文献中的一个或多个 了解 JPEG 软件的内部结构。

JPEG 压缩算法的最佳简短技术介绍是 Wallace, Gregory K. “JPEG 静态图片压缩标准”, ACM 通讯,1991 年 4 月(第 34 卷第 4 期),第 30-44 页。 (该期的相邻文章讨论了 MPEG 电影压缩, JPEG 的应用程序和相关主题。)如果您没有 CACM 问题 方便,包含华莱士文章修订版的 PostScript 文件是 可在 ftp://ftp.uu.net/graphics/jpeg/wallace.ps.gz 获得。该文件(实际上 发表在 IEEE Trans 上的一篇文章的预印本。消费类电子产品) 省略了出现在 CACM 中的示例图像,但它包括更正 和一些添加的材料。注意:Wallace 文章版权所有 ACM 和 IEEE, 并且不得用于商业目的。

可以在以下位置找到对 JPEG 的技术性稍差、更悠闲的介绍 Mark Nelson 和 Jean-loup Gailly 的“数据压缩书”,由 M&T 图书(纽约),第 2 版。 1996 年,国际标准书号 1-55851-434-1。本书提供 多种压缩方法的良好解释和示例 C 代码 包括JPEG。如果您愿意阅读 C,这是一个很好的来源 代码,但一般对数据压缩知之甚少。这本书的 JPEG 示例代码远非工业强度,但是当您准备好查看时 在一个完整的实现中,你在这里有一个......

对JPEG最好的完整描述是教科书《JPEG Still Image Data William B. Pennebaker 和 Joan L. Mitchell 出版的“压缩标准” Van Nostrand Reinhold,1993,ISBN 0-442-01272-1。价格 59.95 美元,638 页。 本书包含 ISO JPEG 标准 (DIS 10918-1 和草案 DIS 10918-2)。这是迄今为止对JPEG最完整的阐述 存在,我们强烈推荐它。

JPEG 标准本身不提供电子版;你必须订购一个 通过 ISO 或 ITU 的纸质副本。 (除非您觉得有必要拥有经过认证的 官方副本,我们建议购买 Pennebaker 和 Mitchell 的书; 它便宜得多,并且包含大量有用的说明材料。) 在美国,可通过 (212) 向 ANSI 销售部门订购该标准的副本 642-4900,或致电 (800) 854-7179 获取全球工程文件。 (ANSI 不接受信用卡订单,但 Global 接受。)它并不便宜:截至 1992 年,ANSI 第 1 部分收费 95 美元,第 2 部分收费 47 美元,外加 7% 运输/处理。该标准分为两部分,第 1 部分是 实际规范,而第 2 部分涵盖合规性测试方法。第1部分 题为“连续色调静止图像的数字压缩和编码, 第 1 部分:要求和指南”并具有文档编号 ISO/IEC IS 10918-1,ITU-T T.81。第 2 部分标题为“数字压缩和编码 连续色调静止图像,第 2 部分:合规性测试”并有文档 编号 ISO/IEC IS 10918-2、ITU-T T.83。

JPEG Part 3 中定义了对原始 JPEG 标准的一些扩展, 更新的 ISO 标准,编号为 ISO/IEC IS 10918-3 和 ITU-T T.84。国际联盟 目前不支持任何第 3 部分扩展。 J

PEG 标准没有指定可互换文件的所有细节 格式。对于省略的细节,我们遵循“JFIF”约定,修订 1.02。 JFIF 规范的副本可从以下网址获得: 文学系 C-Cube 微系统公司 麦卡锡大道 1778 号。 加利福尼亚州米尔皮塔斯 95035 电话 (408) 944-6300,传真 (408) 944-6314 本文档的 PostScript 版本可通过 FTP 获取,网址为 ftp://ftp.uu.net/graphics/jpeg/jfif.ps.gz。还有一个纯文本 版本在 ftp://ftp.uu.net/graphics/jpeg/jfif.txt.gz,但它丢失了 数字。

TIFF 6.0 文件格式规范可以通过 FTP 从 ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz。 JPEG 合并方案 在 3-June-92 的 TIFF 6.0 规范中发现有许多严重的问题。 IJG 不推荐使用 TIFF 6.0 设计(TIFF 压缩标签 6)。 相反,我们推荐 TIFF Technical Note #2 提出的 JPEG 设计 (压缩标签 7)。本说明的副本可从 ftp.sgi.com 或 来自 ftp://ftp.uu.net/graphics/jpeg/。预计下一次改版 TIFF 规范的 6.0 JPEG 设计将替换为 Note 的设计。 虽然 IJG 自己的代码不支持 TIFF/JPEG,但是免费的 libtiff 库 根据 Note 使用我们的库来实现 TIFF/JPEG。 libtiff 可用 来自 ftp://ftp.sgi.com/graphics/tiff/。

存档位置

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

该软件的“官方”存档站点是 ftp.uu.net(Internet 地址 192.48.96.9)。总能找到最新发布的版本 在目录graphics/jpeg中。此特定版本将被存档 作为 ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz。如果你没有 直接上网,UUNET 的档案也可以通过 UUCP 获得;接触 帮助@uunet

.uu.net 以获取有关以这种方式检索文件的信息。 许多 Internet 站点都维护着 UUNET 文件的副本。然而,只有 ftp.uu.net 保证有最新的官方版本。 您也可以从 DOS 兼容的“zip”存档格式获取此软件 SimTel 档案 (ftp://ftp.simtel.net/pub/simtelnet/msdos/graphics/),或 在图形支持论坛 (GO CIS:GRAPHSUP) 中的 CompuServe 上,库 12 “JPEG 工具”。同样,这些版本有时可能落后于 ftp.uu.net 发布。 JPEG FAQ(常见问题)文章是一个有用的来源 有关 JPEG 的一般信息。它不断更新,因此是 不包含在此分布中。常见问题解答每两周发布一次 Usenet 新闻组 comp.graphics.misc、news.answers 和其他组。 它可在万维网上获得,网址为 http://www.faqs.org/faqs/jpeg-faq/ 和其他 news.answers 存档网站,包括官方 news.answers 在 rtfm.mit.edu 存档:ftp://rtfm.mit.edu/pub/usenet/news.answers/jpeg-faq/。 如果您没有 Web 或 FTP 访问权限,请发送电子邮件至 mail-server@rtfm.mit.edu 有身体 发送 usenet/news.answers/jpeg-faq/part1 发送 usenet/news.answers/jpeg-faq/part2

相关软件

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

许多查看和图像处理程序现在都支持 JPEG。 (相当 他们中很少有人使用这个库来这样做。)上面描述的 JPEG FAQ 列出了 一些更受欢迎的免费和共享软件查看器,并告诉您在哪里 在 Internet 上获取它们。 如果您使用的是 Unix 机器,我们强烈推荐 Jef Poskanzer 的免费 PBMPLUS 软件,对 PPM 格式的图像提供许多有用的操作 文件。特别是,它可以将 PPM 图像与各种 其他格式,从而使 cjpeg/djpeg 更加有用。最新的 版本由 NetPBM 组分发,可从众多 站点,特别是 ftp://wuarchive.wustl.edu/graphics/graphics/packages/NetPBM/。 不幸的是,PBMPLUS/NETPBM 的便携性不如 IJG 软件。 你可能很难让它在任何非 Unix 机器上工作。 斯坦福 PVRG 小组编写的另一种免费 JPEG 实现, 可从 ftp://havefun.stanford.edu/pub/jpeg/ 获得。这个节目 专为研究和实验而非生产用途而设计; 与 IJG 代码相比,它更慢、更难使用且可移植性更低,但它 更容易阅读和修改。此外,PVRG 代码支持无损 JPEG, 我们没有。 (另一方面,它不做渐进式 JPEG。)

文件格式

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

一些 JPEG 程序生成的文件与我们的库不兼容。 问题的根源在于 ISO JPEG 委员会未能指定 具体的文件格式。一些供应商自行“填空”, 创建其他人无法阅读的专有格式。 (例如,没有 Macintosh 的早期商业 JPEG 实现 交换压缩文件。) 我们采用的文件格式称为 JFIF(参见参考资料)。这种格式 已获得多家主要商业 JPEG 供应商的认可,并且 成为事实上的标准。 JFIF 是最小或“低端”表示。 我们建议使用 TIFF/JPEG(由 TIFF 修改的 TIFF 6.0 版) 技术说明 #2) 用于需要记录大量数据的“高端”应用程序 有关图像的附加数据。 TIFF/JPEG 是相当新的,尚未广泛使用 支持,可惜了。 即将推出的 JPEG Part 3 标准定义了一种称为 SPIFF 的文件格式。 SPIFF 可与 JFIF 互操作,从某种意义上说,大多数 JFIF 解码器应该 能够阅读最常见的 SPIFF 变体。 SPIFF有一些技术 优于 JFIF,但它的主要声名仅仅是它是一个 官方标准而非非正式标准。目前还不清楚 SPIFF 是否会取代 JFIF 或 JFIF 是否将保持事实上的地位 标准。 IJG 打算在标准冻结后支持 SPIFF,但我们 还没有决定它是否应该成为我们的默认输出格式。 (无论如何,我们的解码器将保持无限期读取 JFIF 的能力。) 还存在各种包含 JPEG 压缩的专有文件格式。 我们对这些格式的存在很少或根本没有同情。的确, 开发这个免费软件的最初原因之一是帮助 迫使 JPEG 文件的通用、开放格式标准趋于一致。别 使用专有文件格式!

未来工作

=====

v7 的主要推动力可能是提高视觉质量。 已知当前缩放量化表的方法不是 非常适合低 Q 值。我们还打算调查区块边界 平滑、“穷人的变量量化”和其他改进方法 在不牺牲兼容性的情况下质量与文件大小的性能。 在未来的版本中,我们正在考虑支持一些即将推出的 JPEG 第 3 部分扩展 --- 主要是可变量化和 SPIFF 文件 佛房间。 与往常一样,加快速度非常有趣。 请将错误报告、提供帮助等发送至 jpeg-info@uunet.uu.net。

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

README for release 6b of 27-Mar-1998
====================================

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, Jim Boucher,
Lee Crocker, Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi,
Guido Vollbeding, 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-1998, 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 Unix configuration script "configure" was produced with GNU Autoconf.
It is copyright by the Free Software Foundation but is freely distributable.
The same holds for its supporting scripts (config.guess, config.sub,
ltconfig, ltmain.sh).  Another support script, install-sh, is copyright
by M.I.T. but is also 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.

The IJG distribution formerly included code to read and write GIF files.
To avoid entanglement with the Unisys LZW patent, GIF reading support has
been removed altogether, and the GIF writer has been simplified to produce
"uncompressed GIFs".  This technique does not use the LZW algorithm; the
resulting GIF files are larger than usual, but are readable by all standard
GIF decoders.

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://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 and Jean-loup Gailly, published by
M&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1.  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 or ITU.  (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 USA, 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 numbers ISO/IEC IS
10918-1, ITU-T T.81.  Part 2 is titled "Digital Compression and Coding of
Continuous-tone Still Images, Part 2: Compliance testing" and has document
numbers ISO/IEC IS 10918-2, ITU-T T.83.

Some extensions to the original JPEG standard are defined in JPEG Part 3,
a newer ISO standard numbered ISO/IEC IS 10918-3 and ITU-T T.84.  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 by FTP at
ftp://ftp.uu.net/graphics/jpeg/jfif.ps.gz.  There is also a plain text
version at ftp://ftp.uu.net/graphics/jpeg/jfif.txt.gz, but it is missing
the figures.

The TIFF 6.0 file format specification can be obtained by FTP from
ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz.  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 ftp.sgi.com or
from ftp://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 ftp://ftp.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 ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz.  If you don't have
direct Internet 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.  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://ftp.simtel.net/pub/simtelnet/msdos/graphics/), or
on CompuServe in the Graphics Support forum (GO CIS: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.misc, news.answers, and other groups.
It is available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/
and other news.answers archive sites, including the official news.answers
archive at rtfm.mit.edu: ftp://rtfm.mit.edu/pub/usenet/news.answers/jpeg-faq/.
If you don't have Web or FTP access, 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 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, thus making cjpeg/djpeg considerably more useful.  The latest
version is distributed by the NetPBM group, and is available from numerous
sites, notably ftp://wuarchive.wustl.edu/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 ftp://havefun.stanford.edu/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.  (On the other hand, it doesn't do progressive JPEG.)


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

The major thrust for v7 will probably be improvement of visual quality.
The current method for scaling the quantization tables is known not to be
very good at low Q values.  We also intend to investigate block boundary
smoothing, "poor man's variable quantization", and other means of improving
quality-vs-file-size performance without sacrificing compatibility.

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

As always, speeding things up is of great interest.

Please send bug reports, offers of help, etc. to jpeg-info@uunet.uu.net.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值