📄 png_specification.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0033)http://www.w3.org/TR/REC-png.html -->
<HTML><HEAD><TITLE>PNG (Portable Network Graphics) Specification</TITLE>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2314.1000" name=GENERATOR></HEAD>
<BODY background=PNG_Specification.files/recbg.jpg>
<H2 align=right><A href="http://www.w3.org/"><IMG align=left alt=W3C: border=0
height=48 src="PNG_Specification.files/w3c_home" width=72></A> REC-png.html</H2>
<H1>PNG (Portable Network Graphics) Specification</H1>
<H1>Version 1.0</H1>
<H3 align=center>W3C Recommendation <I>01-October-1996</I></H3>
<P>For list of authors, see <A
href="http://www.w3.org/TR/REC-png.html#Credits">Credits (Chapter 19)</A>.
<HR>
<H2>Status of this document</H2>
<P>This document has been reviewed by W3C members and other interested parties
and has been endorsed by the Director as a W3C Recommendation. It is a stable
document and may be used as reference material or cited as a normative reference
from another document. W3C's role in making the Recommendation is to draw
attention to the specification and to promote its widespread deployment. This
enhances the functionality and interoperability of the Web.
<P>A list of current W3C Recommendations and other technical documents can be
found at <A
href="http://www.w3.org/pub/WWW/TR/">http://www.w3.org/pub/WWW/TR/</A>.
<P>The Consortium staff have encouraged the development of PNG, as have
Compuserve, Inc. Most of the work has been done by the PNG Development Group,
<TT>png-group@w3.org</TT>. The Consortium does not currently have plans to work
on any future versions of PNG, though were the necessity to arise, and were an
activity in that area to receive the support of Members, the Consortium could in
principle support some future activity.</P>
<HR>
<H2>Abstract</H2>This document describes PNG (Portable Network Graphics), an
extensible file format for the lossless, portable, well-compressed storage of
raster images. PNG provides a patent-free replacement for GIF and can also
replace many common uses of TIFF. Indexed-color, grayscale, and truecolor images
are supported, plus an optional alpha channel. Sample depths range from 1 to 16
bits.
<P>PNG is designed to work well in online viewing applications, such as the
World Wide Web, so it is fully streamable with a progressive display option. PNG
is robust, providing both full file integrity checking and simple detection of
common transmission errors. Also, PNG can store gamma and chromaticity data for
improved color matching on heterogeneous platforms.
<P>This specification defines a proposed Internet Media Type <TT>image/png</TT>.
<HR>
<H2>Table of Contents</H2>
<UL>
<LI><A href="http://www.w3.org/TR/REC-png.html#Introduction">1.
Introduction</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#DataRep">2. Data
Representation</A>
<UL>
<LI><A
href="http://www.w3.org/TR/REC-png.html#DR.Integers-and-byte-order">2.1.
Integers and byte order</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#DR.Color-values">2.2. Color
values</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#DR.Image-layout">2.3. Image
layout</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#DR.Alpha-channel">2.4. Alpha
channel</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#DR.Filtering">2.5.
Filtering</A>
<LI><A
href="http://www.w3.org/TR/REC-png.html#DR.Interlaced-data-order">2.6.
Interlaced data order</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#DR.Gamma-correction">2.7.
Gamma correction</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#DR.Text-strings">2.8. Text
strings</A> </LI></UL>
<LI><A href="http://www.w3.org/TR/REC-png.html#Structure">3. File
Structure</A>
<UL>
<LI><A href="http://www.w3.org/TR/REC-png.html#PNG-file-signature">3.1. PNG
file signature</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#Chunk-layout">3.2. Chunk
layout</A>
<LI><A
href="http://www.w3.org/TR/REC-png.html#Chunk-naming-conventions">3.3. Chunk
naming conventions</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#CRC-algorithm">3.4. CRC
algorithm</A> </LI></UL>
<LI><A href="http://www.w3.org/TR/REC-png.html#Chunks">4. Chunk
Specifications</A>
<UL>
<LI><A href="http://www.w3.org/TR/REC-png.html#C.Critical-chunks">4.1.
Critical chunks</A>
<UL>
<LI><A href="http://www.w3.org/TR/REC-png.html#C.IHDR">4.1.1. <TT>IHDR
</TT>Image header</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#C.PLTE">4.1.2. <TT>PLTE
</TT>Palette</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#C.IDAT">4.1.3. <TT>IDAT
</TT>Image data</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#C.IEND">4.1.4. <TT>IEND
</TT>Image trailer</A> </LI></UL>
<LI><A href="http://www.w3.org/TR/REC-png.html#C.Ancillary-chunks">4.2.
Ancillary chunks</A>
<UL>
<LI><A href="http://www.w3.org/TR/REC-png.html#C.bKGD">4.2.1. <TT>bKGD
</TT>Background color</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#C.cHRM">4.2.2. <TT>cHRM
</TT>Primary chromaticities and white point</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#C.gAMA">4.2.3. <TT>gAMA
</TT>Image gamma</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#C.hIST">4.2.4. <TT>hIST
</TT>Image histogram</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#C.pHYs">4.2.5. <TT>pHYs
</TT>Physical pixel dimensions</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#C.sBIT">4.2.6. <TT>sBIT
</TT>Significant bits</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#C.tEXt">4.2.7. <TT>tEXt
</TT>Textual data</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#C.tIME">4.2.8. <TT>tIME
</TT>Image last-modification time</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#C.tRNS">4.2.9. <TT>tRNS
</TT>Transparency</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#C.zTXt">4.2.10. <TT>zTXt
</TT>Compressed textual data</A> </LI></UL>
<LI><A
href="http://www.w3.org/TR/REC-png.html#C.Summary-of-standard-chunks">4.3.
Summary of standard chunks</A>
<LI><A
href="http://www.w3.org/TR/REC-png.html#C.Additional-chunk-types">4.4.
Additional chunk types</A> </LI></UL>
<LI><A href="http://www.w3.org/TR/REC-png.html#Compression">5. Deflate/Inflate
Compression</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#Filters">6. Filter
Algorithms</A>
<UL>
<LI><A href="http://www.w3.org/TR/REC-png.html#Filter-types">6.1. Filter
types</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#Filter-type-0-None">6.2.
Filter type 0: None</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#Filter-type-1-Sub">6.3.
Filter type 1: Sub</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#Filter-type-2-Up">6.4. Filter
type 2: Up</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#Filter-type-3-Average">6.5.
Filter type 3: Average</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#Filter-type-4-Paeth">6.6.
Filter type 4: Paeth</A> </LI></UL>
<LI><A href="http://www.w3.org/TR/REC-png.html#Ordering">7. Chunk Ordering
Rules</A>
<UL>
<LI><A href="http://www.w3.org/TR/REC-png.html#Behavior-of-PNG-editors">7.1.
Behavior of PNG editors</A>
<LI><A
href="http://www.w3.org/TR/REC-png.html#Ordering-of-ancillary-chunks">7.2.
Ordering of ancillary chunks</A>
<LI><A
href="http://www.w3.org/TR/REC-png.html#Ordering-of-critical-chunks">7.3.
Ordering of critical chunks</A> </LI></UL>
<LI><A href="http://www.w3.org/TR/REC-png.html#Misc">8. Miscellaneous
Topics</A>
<UL>
<LI><A href="http://www.w3.org/TR/REC-png.html#File-name-extension">8.1.
File name extension</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#Media-type">8.2. Internet
media type</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#Macintosh-file-layout">8.3.
Macintosh file layout</A>
<LI><A
href="http://www.w3.org/TR/REC-png.html#Multiple-image-extension">8.4.
Multiple-image extension</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#Security-considerations">8.5.
Security considerations</A> </LI></UL>
<LI><A href="http://www.w3.org/TR/REC-png.html#Encoders">9. Recommendations
for Encoders</A>
<UL>
<LI><A href="http://www.w3.org/TR/REC-png.html#E.Sample-depth-scaling">9.1.
Sample depth scaling</A>
<LI><A
href="http://www.w3.org/TR/REC-png.html#E.Encoder-gamma-handling">9.2.
Encoder gamma handling</A>
<LI><A
href="http://www.w3.org/TR/REC-png.html#E.Encoder-color-handling">9.3.
Encoder color handling</A>
<LI><A
href="http://www.w3.org/TR/REC-png.html#E.Alpha-channel-creation">9.4. Alpha
channel creation</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#E.Suggested-palettes">9.5.
Suggested palettes</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#E.Filter-selection">9.6.
Filter selection</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#E.Text-chunk-processing">9.7.
Text chunk processing</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#E.Use-of-private-chunks">9.8.
Use of private chunks</A>
<LI><A
href="http://www.w3.org/TR/REC-png.html#E.Private-type-and-method-codes">9.9.
Private type and method codes</A> </LI></UL>
<LI><A href="http://www.w3.org/TR/REC-png.html#Decoders">10. Recommendations
for Decoders</A>
<UL>
<LI><A href="http://www.w3.org/TR/REC-png.html#D.Error-checking">10.1. Error
checking</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#D.Pixel-dimensions">10.2.
Pixel dimensions</A>
<LI><A
href="http://www.w3.org/TR/REC-png.html#D.Truecolor-image-handling">10.3.
Truecolor image handling</A>
<LI><A
href="http://www.w3.org/TR/REC-png.html#D.Sample-depth-rescaling">10.4.
Sample depth rescaling</A>
<LI><A
href="http://www.w3.org/TR/REC-png.html#D.Decoder-gamma-handling">10.5.
Decoder gamma handling</A>
<LI><A
href="http://www.w3.org/TR/REC-png.html#D.Decoder-color-handling">10.6.
Decoder color handling</A>
<LI><A href="http://www.w3.org/TR/REC-png.html#D.Background-color">10.7.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -