Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
PNG
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== Critical chunks ==== A decoder must be able to interpret critical chunks to read and render a PNG file. * <code>IHDR</code> must be the first chunk; it contains (in this order) the image's **width (4 bytes) **height (4 bytes) **bit depth (1 byte, values 1, 2, 4, 8, or 16) **color type (1 byte, values 0, 2, 3, 4, or 6) **compression method (1 byte, value 0) **filter method (1 byte, value 0) **interlace method (1 byte, values 0 "no interlace" or 1 "[[Adam7]] interlace") (13 data bytes total).<ref name="w3IHDR">{{Harvnb|W3C|2003|loc=[https://www.w3.org/TR/PNG/#11IHDR 11.2.2 <code>IHDR</code> Image header]}}</ref> As stated in the [[World Wide Web Consortium]], bit depth is defined as "the number of bits per sample or per palette index (not per pixel)".<ref name="w3IHDR"/> * <code>PLTE</code> contains the [[Palette (computing)|palette]]: a list of colors. * <code>IDAT</code> contains the image, which may be split among multiple IDAT chunks. Such splitting slightly increases the file size, but makes it possible to generate a PNG in a streaming manner. The IDAT chunk contains the actual image data, which is the output stream of the compression algorithm.{{Sfn|W3C|2003|loc=[https://www.w3.org/TR/PNG/#11IDAT 11.2.4 <code>IDAT</code> Image data]}} * <code>IEND</code> marks the image end; the data field of the IEND chunk has 0 bytes/is empty.{{Sfn|W3C|2003|loc=[https://www.w3.org/TR/PNG/#11IEND 11.2.5 <code>IEND</code> Image trailer]}} The <code>PLTE</code> chunk is essential for color type 3 (indexed color). It is optional for color types two and six (truecolor and truecolor with alpha) and it must not appear for color types 0 and 4 (grayscale and grayscale with alpha).
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
PNG
(section)
Add topic