Sie sind auf Seite 1von 5

5 Doubts About PNG You Should Clarify.

Transportable Network Graphics (PNG, pronounced /pindi/ PEE-en-JEE or /p/ PING) is a


raster graphics file structure that supports lossless knowledge compression. PNG was
produced as an enhanced, non-patented substitute for Graphics Interchange Format (GIF),
and is the most widely utilised lossless image compression format on the Internet.quotation
necessary

PNG supports palette-based mostly photos (with palettes of -bit RGB or -bit RGBA colours),
grayscale pictures (with or without having alpha channel for transparency), and full-colour
non-palette-based mostly RGB/RGBA images (with or without alpha channel). PNG was
made for transferring images on the World wide web, not for expert-good quality print
graphics, and as a result does not assist non-RGB coloration areas this sort of as CMYK. A
PNG file is made up of a solitary graphic in an extensible structure of "chunks", encoding the
basic pixels and other details such as textual remarks and integrity checks documented in
RFC .

PNG files practically usually use file extension PNG or png and are assigned MIME media
sort graphic/png. PNG was published as informational RFC in March and as an ISO/IEC
normal in .

Historical past and development


See also: Graphics Interchange Format § Unisys and LZW patent enforcement
The determination for making the PNG format was the realization, in early , that the
Lempel–Ziv–Welch (LZW) data compression algorithm employed in the Graphics
Interchange Structure (GIF) structure was patented by Unisys. There had been also other
troubles with the GIF structure that made a replacement appealing, notably its restrict of
colours at a time when computers ready to screen significantly a lot more than colours were
turning out to be frequent.

A January precursory discussion thread, on the usenet newsgroup "comp.graphics" with the
subject Ideas on a GIF-alternative file format, experienced many propositions, which would
later on be element of the PNG file format. In this thread, Oliver Fromme, writer of the
popular DOS JPEG viewer QPEG, proposed the PING name, meaning PING is not GIF, and
also the PNG extension.

Although GIF allows for animation, it was made the decision that PNG ought to be a solitary-
impression structure. In , the builders of PNG revealed the Numerous-picture Community
Graphics (MNG) format, with help for animation. MNG reached average application help, but
not sufficient amid mainstream world wide web browsers and no use amid internet internet
site designers or publishers. In , particular Mozilla builders revealed the Animated
Transportable Community Graphics (APNG) format with equivalent objectives. APNG is a
structure that is natively supported by Gecko- and Presto-based internet browsers and is also
commonly utilized for thumbnails on Sony's PlayStation Transportable program (employing
the standard PNG file extension), and as of , utilization of APNG remains small even with
being supported by all key browsers but Microsoft Edge.

Oct : Variation . of the PNG specification was released, and later on appeared as RFC . It
became a WC Advice on Oct .
December : Edition ., with some modest modifications and the addition of three new chunks,
was launched.
August : Edition ., introducing 1 additional chunk, was unveiled.
November : PNG turned an Global Standard (ISO/IEC :). This version of PNG differs only
slightly from edition . and provides no new chunks.
March : ISO/IEC :.

"Chunks" inside the file


After the header will come a sequence of chunks, each and every of which conveys certain
information about the graphic. Chunks declare them selves as vital or ancillary, and a system
encountering an ancillary chunk that it does not comprehend can safely overlook it. This
chunk-based storage layer construction, equivalent in notion to a container format or to
Amiga's IFF, is developed to permit the PNG structure to be extended while preserving
compatibility with older versions—it supplies ahead compatibility, and this exact same file
structure (with various signature and chunks) is used in the connected MNG, JNG, and
APNG formats.

A chunk is made up of four parts: length ( bytes, large-endian), chunk type/identify ( bytes),
chunk knowledge (duration bytes) and CRC (cyclic redundancy code/checksum bytes). The
CRC is a community-byte-get CRC- computed over the chunk sort and chunk knowledge, but
not the size.

LengthChunk typeChunk dataCRC


bytes bytesLength bytes bytes
Chunk sorts are presented a 4-letter scenario delicate ASCII kind/name assess FourCC. The
circumstance of the various letters in the identify (bit of the numeric benefit of the character)
is a little bit discipline that gives the decoder with some information on the nature of chunks it
does not recognize.
The scenario of the 1st letter indicates whether the chunk is essential or not. If the first letter
is uppercase, the chunk is vital if not, the chunk is ancillary. Vital chunks have info that is
necessary to study the file. If a decoder encounters a critical chunk it does not recognize, it
must abort reading through the file or supply the person with an acceptable warning.

The situation of the 2nd letter suggests regardless of whether the chunk is "public" (both in
the specification or the registry of special-purpose public chunks) or "non-public" (not
standardised). Uppercase is public and lowercase is private. This ensures that public and
private chunk names can never ever conflict with each and every other (even though two
private chunk names could conflict).

The 3rd letter should be uppercase to conform to the PNG specification. It is reserved for
potential expansion. Decoders ought to handle a chunk with a lower circumstance 3rd letter
the identical as any other unrecognised chunk.

The case of the fourth letter implies no matter whether the chunk is protected to copy by
editors that do not identify it. If lowercase, the chunk could be safely and securely copied
regardless of the extent of modifications to the file. If uppercase, it may possibly only be
copied if the modifications have not touched any crucial chunks.

Crucial chunks
A decoder need to be ready to interpret vital chunks to go through and render a PNG file.

IHDR should be the initial chunk it includes (in this order) the image's width, height, bit depth,
shade kind, compression method, filter approach, and interlace approach ( data bytes
complete).
PLTE includes the palette listing of hues.
IDAT is made up of the impression, which might be break up between numerous IDAT
chunks. This sort of splitting raises filesize somewhat, but can make it achievable to make a
PNG in a streaming way. The IDAT chunk contains the genuine graphic information, which is
the output stream of the compression algorithm.
IEND marks the impression finish.
The PLTE chunk is vital for colour type (indexed color). It is optional for coloration varieties
and (truecolor and truecolor with alpha) and it must not appear for colour sorts and
(grayscale and grayscale with alpha).

Ancillary chunks
Other graphic attributes that can be saved in PNG information consist of gamma values,
history shade, and textual metadata details. PNG also supports colour management by
means of the inclusion of ICC colour place profiles.

bKGD offers the default history color. It is meant for use when there is no greater choice
obtainable, this sort of as in standalone image viewers (but not web browsers see beneath
for a lot more details).
cHRM offers the chromaticity coordinates of the exhibit primaries and white position.
dSIG is for storing digital signatures.
eXIf retailers Exif metadata.
gAMA specifies gamma.
hIST can retailer the histogram, or complete sum of every single shade in the graphic.
iCCP is an ICC shade profile.
iTXt consists of a keyword and UTF- textual content, with encodings for feasible compression
and translations marked with language tag. The Extensible Metadata Platform (XMP)
employs this chunk with a key word 'XML:com.adobe.xmp'
pHYs retains the meant pixel size and/or element ratio of the image.
sBIT (significant bits) implies the colour-precision of the source knowledge.
sPLT suggests a palette to use if the total selection of colors is unavailable.
sRGB suggests that the regular sRGB colour place is employed.
sTER stereo-image indicator chunk for stereoscopic images.
Text can shop textual content that can be represented in ISO/IEC -, with one particular
essential-price pair for every single chunk. The "important" need to be among and people
lengthy. Separator is a null character. The "price" can be any duration, like zero up to the
optimum permissible chunk dimension minus the size of the key word and separator. Neither
"important" nor "worth" can contain null character. Foremost or trailing spaces are also
disallowed.
tIME stores the time that the image was final changed.
tRNS includes transparency details. For indexed images, it stores alpha channel values for 1
or much more palette entries. For truecolor and grayscale images, it merchants a solitary
pixel value that is to be regarded as fully transparent.
zTXt includes compressed textual content (and a compression approach marker) with the
identical boundaries as Textual content.
The lowercase first letter in these chunks implies that they are not necessary for the PNG
specification. The lowercase final letter in some chunks suggests that they are safe to copy,
even if the application anxious does not understand them.

Das könnte Ihnen auch gefallen