<s>
Portable	O
Network	O
Graphics	O
(	O
PNG	O
,	O
officially	O
pronounced	O
,	O
colloquially	O
pronounced	O
)	O
is	O
a	O
raster-graphics	B-Algorithm
file	O
format	O
that	O
supports	O
lossless	B-Algorithm
data	I-Algorithm
compression	I-Algorithm
.	O
</s>
<s>
PNG	O
supports	O
palette-based	O
images	O
(	O
with	O
palettes	B-Data_Structure
of	O
24-bit	O
RGB	O
or	O
32-bit	O
RGBA	O
colors	O
)	O
,	O
grayscale	O
images	O
(	O
with	O
or	O
without	O
an	O
alpha	B-Algorithm
channel	I-Algorithm
for	O
transparency	B-Algorithm
)	O
,	O
and	O
full-color	O
non-palette-based	O
RGB	O
or	O
RGBA	O
images	O
.	O
</s>
<s>
The	O
PNG	O
working	O
group	O
designed	O
the	O
format	O
for	O
transferring	O
images	O
on	O
the	O
Internet	O
,	O
not	O
for	O
professional-quality	O
print	O
graphics	O
;	O
therefore	O
,	O
non-RGB	O
color	B-Algorithm
spaces	I-Algorithm
such	O
as	O
CMYK	O
are	O
not	O
supported	O
.	O
</s>
<s>
A	O
PNG	O
file	O
contains	O
a	O
single	O
image	O
in	O
an	O
extensible	O
structure	O
of	O
chunks	B-General_Concept
,	O
encoding	O
the	O
basic	O
pixels	B-Algorithm
and	O
other	O
information	O
such	O
as	O
textual	O
comments	O
and	O
integrity	O
checks	O
documented	O
in	O
RFC	O
2083	O
.	O
</s>
<s>
PNG	O
files	O
have	O
the	O
"	O
.png	O
"	O
file	O
extension	O
and	O
the	O
"	O
image/png	O
"	O
MIME	B-Application
media	B-Application
type	I-Application
.	O
</s>
<s>
The	O
motivation	O
for	O
creating	O
the	O
PNG	O
format	O
was	O
the	O
realization	O
that	O
,	O
on	O
28	O
December	O
1994	O
,	O
the	O
Lempel	B-Algorithm
–	I-Algorithm
Ziv	I-Algorithm
–	I-Algorithm
Welch	I-Algorithm
(	O
LZW	B-Algorithm
)	O
data	B-General_Concept
compression	I-General_Concept
algorithm	I-General_Concept
used	O
in	O
the	O
Graphics	O
Interchange	O
Format	O
(	O
GIF	O
)	O
format	O
was	O
patented	O
by	O
Unisys	O
.	O
</s>
<s>
The	O
patent	O
required	O
that	O
all	O
software	O
supporting	O
GIF	O
pay	O
royalties	O
,	O
leading	O
to	O
a	O
flurry	O
of	O
criticism	O
from	O
Usenet	B-Application
users	O
.	O
</s>
<s>
One	O
of	O
them	O
was	O
Thomas	B-Language
Boutell	I-Language
,	O
who	O
on	O
4	O
January	O
1995	O
posted	O
a	O
precursory	O
discussion	O
thread	O
on	O
the	O
Usenet	B-Application
newsgroup	I-Application
"	O
comp.graphics	O
"	O
in	O
which	O
he	O
devised	O
a	O
plan	O
for	O
a	O
free	O
alternative	O
to	O
GIF	O
.	O
</s>
<s>
Other	O
suggestions	O
later	O
implemented	O
included	O
the	O
deflate	B-Algorithm
compression	I-Algorithm
algorithm	I-Algorithm
and	O
24-bit	O
color	O
support	O
,	O
the	O
lack	O
of	O
the	O
latter	O
in	O
GIF	O
also	O
motivating	O
the	O
team	O
to	O
create	O
their	O
file	O
format	O
.	O
</s>
<s>
Version	O
1.2	O
,	O
released	O
on	O
11	O
August	O
1999	O
,	O
added	O
the	O
iTXt	O
chunk	B-General_Concept
as	O
the	O
specification	O
's	O
only	O
change	O
,	O
and	O
a	O
reformatted	O
version	O
of	O
1.2	O
was	O
released	O
as	O
a	O
second	O
edition	O
of	O
the	O
W3C	O
standard	O
on	O
10	O
November	O
2003	O
,	O
and	O
as	O
an	O
International	O
Standard	O
(	O
)	O
on	O
3	O
March	O
2004	O
.	O
</s>
<s>
In	O
2008	O
,	O
certain	O
Mozilla	B-Operating_System
developers	O
published	O
the	O
Animated	O
Portable	O
Network	O
Graphics	O
(	O
APNG	O
)	O
format	O
with	O
similar	O
goals	O
.	O
</s>
<s>
APNG	O
is	O
a	O
format	O
that	O
is	O
natively	O
supported	O
by	O
Gecko	B-Language
-	O
and	O
Presto-based	O
web	O
browsers	O
and	O
is	O
also	O
commonly	O
used	O
for	O
thumbnails	O
on	O
Sony	B-Operating_System
's	I-Operating_System
PlayStation	I-Operating_System
Portable	I-Operating_System
system	O
(	O
using	O
the	O
normal	O
PNG	O
file	O
extension	O
)	O
.	O
</s>
<s>
In	O
2017	O
,	O
Chromium	B-Language
based	O
browsers	O
adopted	O
APNG	O
support	O
.	O
</s>
<s>
In	O
January	O
2020	O
,	O
Microsoft	B-Application
Edge	I-Application
became	O
Chromium	B-Language
based	O
,	O
thus	O
inheriting	O
support	O
for	O
APNG	O
.	O
</s>
<s>
A	O
PNG	O
file	O
starts	O
with	O
an	O
8-byte	O
signature	O
(	O
refer	O
to	O
hex	B-Application
editor	I-Application
image	O
on	O
the	O
right	O
)	O
:	O
</s>
<s>
Values	O
(	O
hex	O
)	O
Purpose89Has	O
the	O
high	O
bit	O
set	O
to	O
detect	O
transmission	O
systems	O
that	O
do	O
not	O
support	O
8-bit	O
data	O
and	O
to	O
reduce	O
the	O
chance	O
that	O
a	O
text	O
file	O
is	O
mistakenly	O
interpreted	O
as	O
a	O
PNG	O
,	O
or	O
vice	O
versa.50	O
4E	O
47In	O
ASCII	B-Protocol
,	O
the	O
letters	O
PNG	O
,	O
allowing	O
a	O
person	O
to	O
identify	O
the	O
format	O
easily	O
if	O
it	O
is	O
viewed	O
in	O
a	O
text	O
editor.0D	O
0AA	O
DOS-style	O
line	O
ending	O
(	O
CRLF	O
)	O
to	O
detect	O
DOS-Unix	O
line	O
ending	O
conversion	O
of	O
the	O
data.1AA	O
byte	B-Application
that	O
stops	O
display	O
of	O
the	O
file	O
under	O
DOS	B-Device
when	O
the	O
command	O
type	B-Device
has	O
been	O
used	O
—	O
the	O
end-of-file	B-Language
character.0AA	O
Unix-style	O
line	O
ending	O
(	O
LF	O
)	O
to	O
detect	O
Unix-DOS	O
line	O
ending	O
conversion	O
.	O
</s>
<s>
After	O
the	O
header	O
,	O
comes	O
a	O
series	O
of	O
chunks	B-General_Concept
,	O
each	O
of	O
which	O
conveys	O
certain	O
information	O
about	O
the	O
image	O
.	O
</s>
<s>
Chunks	B-General_Concept
declare	O
themselves	O
as	O
critical	O
or	O
ancillary	O
,	O
and	O
a	O
program	O
encountering	O
an	O
ancillary	O
chunk	B-General_Concept
that	O
it	O
does	O
not	O
understand	O
can	O
safely	O
ignore	O
it	O
.	O
</s>
<s>
This	O
chunk-based	O
storage	O
layer	O
structure	O
,	O
similar	O
in	O
concept	O
to	O
a	O
container	O
format	O
or	O
to	O
Amigas	B-Device
IFF	B-Device
,	O
is	O
designed	O
to	O
allow	O
the	O
PNG	O
format	O
to	O
be	O
extended	O
while	O
maintaining	O
compatibility	O
with	O
older	O
versions	O
—	O
it	O
provides	O
forward	B-General_Concept
compatibility	I-General_Concept
,	O
and	O
this	O
same	O
file	O
structure	O
(	O
with	O
different	O
signature	O
and	O
chunks	B-General_Concept
)	O
is	O
used	O
in	O
the	O
associated	O
MNG	O
,	O
JNG	O
,	O
and	O
APNG	O
formats	O
.	O
</s>
<s>
A	O
chunk	B-General_Concept
consists	O
of	O
four	O
parts	O
:	O
length	O
(	O
4	O
bytes	B-Application
,	O
big-endian	O
)	O
,	O
chunk	B-General_Concept
type/name	O
(	O
4	O
bytes	B-Application
)	O
,	O
chunk	B-General_Concept
data	O
(	O
length	O
bytes	B-Application
)	O
and	O
CRC	O
(	O
cyclic	O
redundancy	O
code/checksum	O
;	O
4	O
bytes	B-Application
)	O
.	O
</s>
<s>
The	O
CRC	O
is	O
a	O
network-byte-order	O
CRC-32	B-Algorithm
computed	O
over	O
the	O
chunk	B-General_Concept
type	B-Device
and	O
chunk	B-General_Concept
data	O
,	O
but	O
not	O
the	O
length	O
.	O
</s>
<s>
Chunk	B-General_Concept
types	O
are	O
given	O
a	O
four-letter	O
case	O
sensitive	O
ASCII	B-Protocol
type/name	O
;	O
compare	O
FourCC	B-Application
.	O
</s>
<s>
The	O
case	O
of	O
the	O
different	O
letters	O
in	O
the	O
name	O
(	O
bit	O
5	O
of	O
the	O
numeric	O
value	O
of	O
the	O
character	O
)	O
is	O
a	O
bit	O
field	O
that	O
provides	O
the	O
decoder	B-General_Concept
with	O
some	O
information	O
on	O
the	O
nature	O
of	O
chunks	B-General_Concept
it	O
does	O
not	O
recognize	O
.	O
</s>
<s>
The	O
case	O
of	O
the	O
first	O
letter	O
indicates	O
whether	O
the	O
chunk	B-General_Concept
is	O
critical	O
or	O
not	O
.	O
</s>
<s>
If	O
the	O
first	O
letter	O
is	O
uppercase	O
,	O
the	O
chunk	B-General_Concept
is	O
critical	O
;	O
if	O
not	O
,	O
the	O
chunk	B-General_Concept
is	O
ancillary	O
.	O
</s>
<s>
Critical	O
chunks	B-General_Concept
contain	O
information	O
that	O
is	O
necessary	O
to	O
read	O
the	O
file	O
.	O
</s>
<s>
If	O
a	O
decoder	B-General_Concept
encounters	O
a	O
critical	O
chunk	B-General_Concept
it	O
does	O
not	O
recognize	O
,	O
it	O
must	O
abort	O
reading	O
the	O
file	O
or	O
supply	O
the	O
user	O
with	O
an	O
appropriate	O
warning	O
.	O
</s>
<s>
The	O
case	O
of	O
the	O
second	O
letter	O
indicates	O
whether	O
the	O
chunk	B-General_Concept
is	O
"	O
public	O
"	O
(	O
either	O
in	O
the	O
specification	O
or	O
the	O
registry	O
of	O
special-purpose	O
public	O
chunks	B-General_Concept
)	O
or	O
"	O
private	O
"	O
(	O
not	O
standardised	O
)	O
.	O
</s>
<s>
This	O
ensures	O
that	O
public	O
and	O
private	O
chunk	B-General_Concept
names	O
can	O
never	O
conflict	O
with	O
each	O
other	O
(	O
although	O
two	O
private	O
chunk	B-General_Concept
names	O
could	O
conflict	O
)	O
.	O
</s>
<s>
Decoders	O
should	O
treat	O
a	O
chunk	B-General_Concept
with	O
a	O
lower	O
case	O
third	O
letter	O
the	O
same	O
as	O
any	O
other	O
unrecognised	O
chunk	B-General_Concept
.	O
</s>
<s>
The	O
case	O
of	O
the	O
fourth	O
letter	O
indicates	O
whether	O
the	O
chunk	B-General_Concept
is	O
safe	O
to	O
copy	O
by	O
editors	O
that	O
do	O
not	O
recognize	O
it	O
.	O
</s>
<s>
If	O
lowercase	O
,	O
the	O
chunk	B-General_Concept
may	O
be	O
safely	O
copied	O
regardless	O
of	O
the	O
extent	O
of	O
modifications	O
to	O
the	O
file	O
.	O
</s>
<s>
If	O
uppercase	O
,	O
it	O
may	O
only	O
be	O
copied	O
if	O
the	O
modifications	O
have	O
not	O
touched	O
any	O
critical	O
chunks	B-General_Concept
.	O
</s>
<s>
A	O
decoder	B-General_Concept
must	O
be	O
able	O
to	O
interpret	O
critical	O
chunks	B-General_Concept
to	O
read	O
and	O
render	O
a	O
PNG	O
file	O
.	O
</s>
<s>
interlace	O
method	O
(	O
1	O
byte	B-Application
,	O
values	O
0	O
"	O
no	O
interlace	O
"	O
or	O
1	O
"	O
Adam7	B-Algorithm
interlace	O
"	O
)	O
(	O
13	O
data	O
bytes	B-Application
total	O
)	O
.	O
</s>
<s>
As	O
stated	O
in	O
the	O
World	O
Wide	O
Web	O
Consortium	O
,	O
bit	O
depth	O
is	O
defined	O
as	O
"	O
the	O
number	O
of	O
bits	O
per	O
sample	O
or	O
per	O
palette	B-Data_Structure
index	O
(	O
not	O
per	O
pixel	B-Algorithm
)	O
"	O
.	O
</s>
<s>
PLTE	O
contains	O
the	O
palette	B-Data_Structure
:	O
a	O
list	O
of	O
colors	O
.	O
</s>
<s>
IDAT	O
contains	O
the	O
image	O
,	O
which	O
may	O
be	O
split	O
among	O
multiple	O
IDAT	O
chunks	B-General_Concept
.	O
</s>
<s>
The	O
IDAT	O
chunk	B-General_Concept
contains	O
the	O
actual	O
image	O
data	O
,	O
which	O
is	O
the	O
output	O
stream	O
of	O
the	O
compression	B-General_Concept
algorithm	I-General_Concept
.	O
</s>
<s>
IEND	O
marks	O
the	O
image	O
end	O
;	O
the	O
data	O
field	O
of	O
the	O
IEND	O
chunk	B-General_Concept
has	O
0	O
bytes/is	O
empty	O
.	O
</s>
<s>
The	O
PLTE	O
chunk	B-General_Concept
is	O
essential	O
for	O
color	O
type	B-Device
3	O
(	O
indexed	B-Data_Structure
color	I-Data_Structure
)	O
.	O
</s>
<s>
The	O
gAMA	O
chunk	B-General_Concept
contains	O
only	O
4	O
bytes	B-Application
,	O
and	O
its	O
value	O
represents	O
the	O
gamma	O
value	O
multiplied	O
by	O
100,000	O
;	O
for	O
example	O
,	O
the	O
gamma	O
value	O
1/3.4	O
calculates	O
to	O
29411.7647059	O
( ( 	O
1/3.4	O
)	O
*( 	O
100,000	O
)	O
)	O
and	O
is	O
converted	O
to	O
an	O
integer	O
(	O
29412	O
)	O
for	O
storage	O
.	O
</s>
<s>
pHYs	O
holds	O
the	O
intended	O
pixel	B-Algorithm
size	O
(	O
or	O
pixel	B-Algorithm
aspect	O
ratio	O
)	O
;	O
the	O
pHYs	O
contains	O
"	O
Pixels	B-Algorithm
per	O
unit	O
,	O
X	O
axis	O
"	O
(	O
4	O
bytes	B-Application
)	O
,	O
"	O
Pixels	B-Algorithm
per	O
unit	O
,	O
Y	O
axis	O
"	O
(	O
4	O
bytes	B-Application
)	O
,	O
and	O
"	O
Unit	O
specifier	O
"	O
(	O
1	O
byte	B-Application
)	O
for	O
a	O
total	O
of	O
9	O
bytes	B-Application
.	O
</s>
<s>
sBIT	O
(	O
significant	O
bits	O
)	O
indicates	O
the	O
color-accuracy	O
of	O
the	O
source	O
data	O
;	O
this	O
chunk	B-General_Concept
contains	O
a	O
total	O
of	O
between	O
1	O
and	O
5	O
bytes	B-Application
,	O
depending	O
on	O
the	O
color	O
type	B-Device
.	O
</s>
<s>
sPLT	O
suggests	O
a	O
palette	B-Data_Structure
to	O
use	O
if	O
the	O
full	O
range	O
of	O
colors	O
is	O
unavailable	O
.	O
</s>
<s>
sRGB	O
indicates	O
that	O
the	O
standard	O
sRGB	O
color	B-Algorithm
space	I-Algorithm
is	O
used	O
;	O
the	O
sRGB	O
chunk	B-General_Concept
contains	O
only	O
1	O
byte	B-Application
,	O
which	O
is	O
used	O
for	O
"	O
rendering	O
intent	O
"	O
(	O
4	O
values0	O
,	O
1	O
,	O
2	O
,	O
and	O
3are	O
defined	O
for	O
rendering	O
intent	O
)	O
.	O
</s>
<s>
sTER	O
stereo-image	O
indicator	O
chunk	B-General_Concept
for	O
stereoscopic	B-Algorithm
images	I-Algorithm
.	O
</s>
<s>
tEXt	O
can	O
store	O
text	O
that	O
can	O
be	O
represented	O
in	O
ISO/IEC	O
8859-1	O
,	O
with	O
one	O
key-value	B-Application
pair	I-Application
for	O
each	O
chunk	B-General_Concept
.	O
</s>
<s>
The	O
"	O
value	O
"	O
can	O
be	O
any	O
length	O
,	O
including	O
zero	O
up	O
to	O
the	O
maximum	O
permissible	O
chunk	B-General_Concept
size	O
minus	O
the	O
length	O
of	O
the	O
keyword	O
and	O
separator	O
.	O
</s>
<s>
tRNS	O
contains	O
transparency	B-Algorithm
information	O
.	O
</s>
<s>
For	O
indexed	B-Data_Structure
images	I-Data_Structure
,	O
it	O
stores	O
alpha	B-Algorithm
channel	I-Algorithm
values	O
for	O
one	O
or	O
more	O
palette	B-Data_Structure
entries	I-Data_Structure
.	O
</s>
<s>
For	O
truecolor	O
and	O
grayscale	O
images	O
,	O
it	O
stores	O
a	O
single	O
pixel	B-Algorithm
value	O
that	O
is	O
to	O
be	O
regarded	O
as	O
fully	O
transparent	O
.	O
</s>
<s>
The	O
lowercase	O
first	O
letter	O
in	O
these	O
chunks	B-General_Concept
indicates	O
that	O
they	O
are	O
not	O
needed	O
for	O
the	O
PNG	O
specification	O
.	O
</s>
<s>
The	O
lowercase	O
last	O
letter	O
in	O
some	O
chunks	B-General_Concept
indicates	O
that	O
they	O
are	O
safe	O
to	O
copy	O
,	O
even	O
if	O
the	O
application	O
concerned	O
does	O
not	O
understand	O
them	O
.	O
</s>
<s>
Pixels	B-Algorithm
in	O
PNG	O
images	O
are	O
numbers	O
that	O
may	O
be	O
either	O
indices	O
of	O
sample	O
data	O
in	O
the	O
palette	B-Data_Structure
or	O
the	O
sample	O
data	O
itself	O
.	O
</s>
<s>
The	O
palette	B-Data_Structure
is	O
a	O
separate	O
table	O
contained	O
in	O
the	O
PLTE	O
chunk	B-General_Concept
.	O
</s>
<s>
Sample	O
data	O
for	O
a	O
single	O
pixel	B-Algorithm
consists	O
of	O
a	O
tuple	O
of	O
between	O
one	O
and	O
four	O
numbers	O
.	O
</s>
<s>
Whether	O
the	O
pixel	B-Algorithm
data	O
represents	O
palette	B-Data_Structure
indices	O
or	O
explicit	O
sample	O
values	O
,	O
the	O
numbers	O
are	O
referred	O
to	O
as	O
channels	B-Algorithm
and	O
every	O
number	O
in	O
the	O
image	O
is	O
encoded	O
with	O
an	O
identical	O
format	O
.	O
</s>
<s>
Notice	O
that	O
this	O
is	O
not	O
the	O
same	O
as	O
color	O
depth	O
,	O
which	O
is	O
commonly	O
used	O
to	O
refer	O
to	O
the	O
total	O
number	O
of	O
bits	O
in	O
each	O
pixel	B-Algorithm
,	O
not	O
each	O
channel	O
.	O
</s>
<s>
The	O
permitted	O
bit	O
depths	O
are	O
summarized	O
in	O
the	O
table	O
along	O
with	O
the	O
total	O
number	O
of	O
bits	O
used	O
for	O
each	O
pixel	B-Algorithm
.	O
</s>
<s>
The	O
number	O
of	O
channels	B-Algorithm
depends	O
on	O
whether	O
the	O
image	O
is	O
grayscale	O
or	O
color	O
and	O
whether	O
it	O
has	O
an	O
alpha	B-Algorithm
channel	I-Algorithm
.	O
</s>
<s>
PNG	O
allows	O
the	O
following	O
combinations	O
of	O
channels	B-Algorithm
,	O
called	O
the	O
color	O
type	B-Device
.	O
</s>
<s>
The	O
color	O
type	B-Device
is	O
specified	O
as	O
an	O
8-bit	O
value	O
however	O
only	O
the	O
low	O
three	O
bits	O
are	O
used	O
and	O
,	O
even	O
then	O
,	O
only	O
the	O
five	O
combinations	O
listed	O
above	O
are	O
permitted	O
.	O
</s>
<s>
So	O
long	O
as	O
the	O
color	O
type	B-Device
is	O
valid	O
it	O
can	O
be	O
considered	O
as	O
a	O
bit	O
field	O
as	O
summarized	O
in	O
the	O
adjacent	O
table	O
:	O
</s>
<s>
bit	O
value	O
1	O
:	O
the	O
image	O
data	O
stores	O
palette	B-Data_Structure
indices	O
.	O
</s>
<s>
bit	O
value	O
2	O
:	O
the	O
image	O
samples	O
contain	O
three	O
channels	B-Algorithm
of	O
data	O
encoding	O
trichromatic	O
colors	O
,	O
otherwise	O
the	O
image	O
samples	O
contain	O
one	O
channel	O
of	O
data	O
encoding	O
relative	O
luminance	O
,	O
</s>
<s>
bit	O
value	O
4	O
:	O
the	O
image	O
samples	O
also	O
contain	O
an	O
alpha	B-Algorithm
channel	I-Algorithm
expressed	O
as	O
a	O
linear	O
measure	O
of	O
the	O
opacity	O
of	O
the	O
pixel	B-Algorithm
.	O
</s>
<s>
With	O
indexed	B-Data_Structure
color	I-Data_Structure
images	O
,	O
the	O
palette	B-Data_Structure
always	O
stores	O
trichromatic	O
colors	O
at	O
a	O
depth	O
of	O
8	O
bits	O
per	O
channel	O
(	O
24	O
bits	O
per	O
palette	B-Data_Structure
entry	I-Data_Structure
)	O
.	O
</s>
<s>
Additionally	O
,	O
an	O
optional	O
list	O
of	O
8-bit	O
alpha	O
values	O
for	O
the	O
palette	B-Data_Structure
entries	I-Data_Structure
may	O
be	O
included	O
;	O
if	O
not	O
included	O
,	O
or	O
if	O
shorter	O
than	O
the	O
palette	B-Data_Structure
,	O
the	O
remaining	O
palette	B-Data_Structure
entries	I-Data_Structure
are	O
assumed	O
to	O
be	O
opaque	O
.	O
</s>
<s>
The	O
palette	B-Data_Structure
must	O
not	O
have	O
more	O
entries	O
than	O
the	O
image	O
bit	O
depth	O
allows	O
for	O
,	O
but	O
it	O
may	O
have	O
fewer	O
(	O
for	O
example	O
,	O
if	O
an	O
image	O
with	O
8-bit	O
pixels	B-Algorithm
only	O
uses	O
90	O
colors	O
then	O
it	O
does	O
not	O
need	O
palette	B-Data_Structure
entries	I-Data_Structure
for	O
all	O
256	O
colors	O
)	O
.	O
</s>
<s>
The	O
palette	B-Data_Structure
must	O
contain	O
entries	O
for	O
all	O
the	O
pixel	B-Algorithm
values	O
present	O
in	O
the	O
image	O
.	O
</s>
<s>
The	O
standard	O
allows	O
indexed	B-Data_Structure
color	I-Data_Structure
PNGs	O
to	O
have	O
1	O
,	O
2	O
,	O
4	O
or	O
8	O
bits	O
per	O
pixel	B-Algorithm
;	O
grayscale	O
images	O
with	O
no	O
alpha	B-Algorithm
channel	I-Algorithm
may	O
have	O
1	O
,	O
2	O
,	O
4	O
,	O
8	O
or	O
16	O
bits	O
per	O
pixel	B-Algorithm
.	O
</s>
<s>
The	O
standard	O
requires	O
that	O
decoders	O
can	O
read	O
all	O
supported	O
color	O
formats	O
,	O
but	O
many	O
image	B-Application
editors	I-Application
can	O
only	O
produce	O
a	O
small	O
subset	O
of	O
them	O
.	O
</s>
<s>
PNG	O
offers	O
a	O
variety	O
of	O
transparency	B-Algorithm
options	O
.	O
</s>
<s>
With	O
true-color	O
and	O
grayscale	O
images	O
either	O
a	O
single	O
pixel	B-Algorithm
value	O
can	O
be	O
declared	O
as	O
transparent	O
or	O
an	O
alpha	B-Algorithm
channel	I-Algorithm
can	O
be	O
added	O
(	O
enabling	O
any	O
percentage	O
of	O
partial	O
transparency	B-Algorithm
to	O
be	O
used	O
)	O
.	O
</s>
<s>
For	O
paletted	O
images	O
,	O
alpha	O
values	O
can	O
be	O
added	O
to	O
palette	B-Data_Structure
entries	I-Data_Structure
.	O
</s>
<s>
The	O
number	O
of	O
such	O
values	O
stored	O
may	O
be	O
less	O
than	O
the	O
total	O
number	O
of	O
palette	B-Data_Structure
entries	I-Data_Structure
,	O
in	O
which	O
case	O
the	O
remaining	O
entries	O
are	O
considered	O
fully	O
opaque	O
.	O
</s>
<s>
The	O
scanning	O
of	O
pixel	B-Algorithm
values	O
for	O
binary	O
transparency	B-Algorithm
is	O
supposed	O
to	O
be	O
performed	O
before	O
any	O
color	O
reduction	O
to	O
avoid	O
pixels	B-Algorithm
becoming	O
unintentionally	O
transparent	O
.	O
</s>
<s>
Alpha	O
storage	O
can	O
be	O
"	O
associated	O
"	O
(	O
"	O
premultiplied	B-Algorithm
"	O
)	O
or	O
"	O
unassociated	O
"	O
,	O
but	O
PNG	O
standardized	O
on	O
"	O
unassociated	O
"	O
(	O
"	O
non-premultiplied	O
"	O
)	O
alpha	O
,	O
which	O
means	O
that	O
imagery	O
is	O
not	O
alpha	O
encoded	O
;	O
the	O
emissions	O
represented	O
in	O
RGB	O
are	O
not	O
the	O
emissions	O
at	O
the	O
pixel	B-Algorithm
level	O
.	O
</s>
<s>
PNG	O
uses	O
DEFLATE	B-Algorithm
,	O
a	O
non-patented	O
lossless	B-Algorithm
data	I-Algorithm
compression	I-Algorithm
algorithm	O
involving	O
a	O
combination	O
of	O
LZ77	B-Algorithm
and	O
Huffman	B-General_Concept
coding	I-General_Concept
.	O
</s>
<s>
Permissively	B-License
licensed	I-License
DEFLATE	B-Algorithm
implementations	O
,	O
such	O
as	O
zlib	B-Language
,	O
are	O
widely	O
available	O
.	O
</s>
<s>
Compared	O
to	O
formats	O
with	O
lossy	B-Algorithm
compression	I-Algorithm
such	O
as	O
JPEG	O
,	O
choosing	O
a	O
compression	O
setting	O
higher	O
than	O
average	O
delays	O
processing	O
,	O
but	O
often	O
does	O
not	O
result	O
in	O
a	O
significantly	O
smaller	O
file	O
size	O
.	O
</s>
<s>
Before	O
DEFLATE	B-Algorithm
is	O
applied	O
,	O
the	O
data	O
is	O
transformed	O
via	O
a	O
prediction	O
method	O
:	O
a	O
single	O
filter	O
method	O
is	O
used	O
for	O
the	O
entire	O
image	O
,	O
while	O
for	O
each	O
image	O
line	O
,	O
a	O
filter	O
type	B-Device
is	O
chosen	O
to	O
transform	O
the	O
data	O
to	O
make	O
it	O
more	O
efficiently	O
compressible	O
.	O
</s>
<s>
The	O
filter	O
type	B-Device
used	O
for	O
a	O
scanline	O
is	O
prepended	O
to	O
the	O
scanline	O
to	O
enable	O
inline	O
decompression	O
.	O
</s>
<s>
There	O
is	O
only	O
one	O
filter	O
method	O
in	O
the	O
current	O
PNG	O
specification	O
(	O
denoted	O
method	O
0	O
)	O
,	O
and	O
thus	O
in	O
practice	O
the	O
only	O
choice	O
is	O
which	O
filter	O
type	B-Device
to	O
apply	O
to	O
each	O
line	O
.	O
</s>
<s>
For	O
this	O
method	O
,	O
the	O
filter	O
predicts	O
the	O
value	O
of	O
each	O
pixel	B-Algorithm
based	O
on	O
the	O
values	O
of	O
previous	O
neighboring	O
pixels	B-Algorithm
,	O
and	O
subtracts	O
the	O
predicted	O
color	O
of	O
the	O
pixel	B-Algorithm
from	O
the	O
actual	O
value	O
,	O
as	O
in	O
DPCM	B-General_Concept
.	O
</s>
<s>
This	O
is	O
particularly	O
important	O
in	O
relating	O
separate	O
rows	O
,	O
since	O
DEFLATE	B-Algorithm
has	O
no	O
understanding	O
that	O
an	O
image	O
is	O
a	O
2D	O
entity	O
,	O
and	O
instead	O
just	O
sees	O
the	O
image	O
data	O
as	O
a	O
stream	O
of	O
bytes	B-Application
.	O
</s>
<s>
There	O
are	O
five	O
filter	O
types	O
for	O
filter	O
method	O
0	O
;	O
each	O
type	B-Device
predicts	O
the	O
value	O
of	O
each	O
byte	B-Application
(	O
of	O
the	O
image	O
data	O
before	O
filtering	O
)	O
based	O
on	O
the	O
corresponding	O
byte	B-Application
of	O
the	O
pixel	B-Algorithm
to	O
the	O
left	O
(	O
A	O
)	O
,	O
the	O
pixel	B-Algorithm
above	O
(	O
B	O
)	O
,	O
and	O
the	O
pixel	B-Algorithm
above	O
and	O
to	O
the	O
left	O
(	O
C	O
)	O
or	O
some	O
combination	O
thereof	O
,	O
and	O
encodes	O
the	O
difference	O
between	O
the	O
predicted	O
value	O
and	O
the	O
actual	O
value	O
.	O
</s>
<s>
Filters	O
are	O
applied	O
to	O
byte	B-Application
values	O
,	O
not	O
pixels	B-Algorithm
;	O
pixel	B-Algorithm
values	O
may	O
be	O
one	O
or	O
two	O
bytes	B-Application
,	O
or	O
several	O
values	O
per	O
byte	B-Application
,	O
but	O
never	O
cross	O
byte	B-Application
boundaries	O
.	O
</s>
<s>
Compare	O
to	O
the	O
version	O
of	O
DPCM	B-General_Concept
used	O
in	O
lossless	B-Algorithm
JPEG	O
,	O
and	O
to	O
the	O
discrete	O
wavelet	O
transform	O
using	O
1	O
×	O
2	O
,	O
2	O
×	O
1	O
,	O
or	O
(	O
for	O
the	O
Paeth	O
predictor	O
)	O
2	O
×	O
2	O
windows	O
and	O
Haar	O
wavelets	O
.	O
</s>
<s>
PNG	O
offers	O
an	O
optional	O
2-dimensional	O
,	O
7-pass	O
interlacing	O
scheme	O
—	O
the	O
Adam7	B-Algorithm
algorithm	I-Algorithm
.	O
</s>
<s>
This	O
is	O
more	O
sophisticated	O
than	O
GIF	O
's	O
1-dimensional	O
,	O
4-pass	O
scheme	O
,	O
and	O
allows	O
a	O
clearer	O
low-resolution	O
image	O
to	O
be	O
visible	O
earlier	O
in	O
the	O
transfer	O
,	O
particularly	O
if	O
interpolation	O
algorithms	O
such	O
as	O
bicubic	B-Algorithm
interpolation	I-Algorithm
are	O
used	O
.	O
</s>
<s>
MNG	O
shares	O
PNG	O
's	O
basic	O
structure	O
and	O
chunks	B-General_Concept
,	O
but	O
it	O
is	O
significantly	O
more	O
complex	O
and	O
has	O
a	O
different	O
file	O
signature	O
,	O
which	O
automatically	O
renders	O
it	O
incompatible	O
with	O
standard	O
PNG	O
decoders	O
.	O
</s>
<s>
The	O
complexity	O
of	O
MNG	O
led	O
to	O
the	O
proposal	O
of	O
APNG	O
by	O
developers	O
at	O
the	O
Mozilla	B-Operating_System
Foundation	O
.	O
</s>
<s>
APNG	O
is	O
supported	O
in	O
Firefox	B-Application
3.0	O
and	O
up	O
,	O
Pale	B-Protocol
Moon	I-Protocol
(	O
all	O
versions	O
)	O
,	O
and	O
Safari	B-Application
8.0	O
and	O
up	O
.	O
</s>
<s>
Chromium	B-Language
59.0	O
added	O
APNG	O
support	O
,	O
followed	O
by	O
Google	B-Application
Chrome	I-Application
.	O
</s>
<s>
Opera	B-Application
supported	O
APNG	O
in	O
versions	O
10	O
–	O
12.1	O
,	O
but	O
support	O
lapsed	O
in	O
version	O
15	O
when	O
it	O
switched	O
to	O
the	O
Blink	B-Language
rendering	O
engine	O
;	O
support	O
was	O
re-added	O
in	O
Opera	B-Application
46	O
(	O
inherited	O
from	O
Chromium	B-Language
59	O
)	O
.	O
</s>
<s>
Microsoft	B-Application
Edge	I-Application
has	O
supported	O
APNG	O
since	O
version	O
79.0	O
,	O
when	O
it	O
switched	O
to	O
a	O
Chromium-based	O
engine	O
.	O
</s>
<s>
Displayed	O
in	O
the	O
fashion	O
of	O
hex	B-Application
editors	I-Application
,	O
with	O
on	O
the	O
left	O
side	O
byte	B-Application
values	O
shown	O
in	O
hex	O
format	O
,	O
and	O
on	O
the	O
right	O
side	O
their	O
equivalent	O
characters	O
from	O
ISO-8859-1	O
with	O
unrecognized	O
and	O
control	O
characters	O
replaced	O
with	O
periods	O
.	O
</s>
<s>
Additionally	O
the	O
PNG	O
signature	O
and	O
individual	O
chunks	B-General_Concept
are	O
marked	O
with	O
colors	O
.	O
</s>
<s>
Note	O
they	O
are	O
easy	O
to	O
identify	O
because	O
of	O
their	O
human	O
readable	O
type	B-Device
names	O
(	O
in	O
this	O
example	O
PNG	O
,	O
IHDR	O
,	O
IDAT	O
,	O
and	O
IEND	O
)	O
.	O
</s>
<s>
Completeness	O
:	O
it	O
's	O
possible	O
to	O
represent	O
truecolor	O
,	O
indexed-color	B-Data_Structure
,	O
and	O
greyscale	O
images	O
.	O
</s>
<s>
Interchangeability	O
:	O
any	O
PNG	O
decoder	B-General_Concept
that	O
follows	O
the	O
standards	O
can	O
read	O
all	O
PNG	O
data	O
streams	O
.	O
</s>
<s>
PNG	O
gives	O
a	O
much	O
wider	O
range	O
of	O
transparency	B-Algorithm
options	O
than	O
GIF	O
,	O
including	O
alpha	B-Algorithm
channel	I-Algorithm
transparency	B-Algorithm
.	O
</s>
<s>
Whereas	O
GIF	O
is	O
limited	O
to	O
8-bit	O
indexed	B-Data_Structure
color	I-Data_Structure
,	O
PNG	O
gives	O
a	O
much	O
wider	O
range	O
of	O
color	O
depths	O
,	O
including	O
24-bit	O
(	O
8	O
bits	O
per	O
channel	O
)	O
and	O
48-bit	O
(	O
16	O
bits	O
per	O
channel	O
)	O
truecolor	O
,	O
allowing	O
for	O
greater	O
color	O
precision	O
,	O
smoother	O
fades	O
,	O
etc	O
.	O
</s>
<s>
When	O
an	O
alpha	B-Algorithm
channel	I-Algorithm
is	O
added	O
,	O
up	O
to	O
64	O
bits	O
per	O
pixel	B-Algorithm
(	O
before	O
compression	O
)	O
are	O
possible	O
.	O
</s>
<s>
When	O
converting	O
an	O
image	O
from	O
the	O
PNG	O
format	O
to	O
GIF	O
,	O
the	O
image	O
quality	O
may	O
suffer	O
due	O
to	O
posterization	B-Algorithm
if	O
the	O
PNG	O
image	O
has	O
more	O
than	O
256	O
colors	O
.	O
</s>
<s>
The	O
JPEG	O
(	O
Joint	O
Photographic	O
Experts	O
Group	O
)	O
format	O
can	O
produce	O
a	O
smaller	O
file	O
than	O
PNG	O
for	O
photographic	O
(	O
and	O
photo-like	O
)	O
images	O
,	O
since	O
JPEG	O
uses	O
a	O
lossy	B-Algorithm
encoding	I-Algorithm
method	I-Algorithm
specifically	O
designed	O
for	O
photographic	O
image	O
data	O
,	O
which	O
is	O
typically	O
dominated	O
by	O
soft	O
,	O
low-contrast	O
transitions	O
,	O
and	O
an	O
amount	O
of	O
noise	O
or	O
similar	O
irregular	O
structures	O
.	O
</s>
<s>
Using	O
PNG	O
instead	O
of	O
a	O
high-quality	O
JPEG	O
for	O
such	O
images	O
would	O
result	O
in	O
a	O
large	O
increase	O
in	O
filesize	O
with	O
negligible	B-Algorithm
gain	O
in	O
quality	O
.	O
</s>
<s>
Additionally	O
,	O
PNG	O
is	O
lossless	B-Algorithm
,	O
while	O
JPEG	O
produces	O
visual	O
artifacts	B-Algorithm
around	O
high-contrast	O
areas	O
.	O
</s>
<s>
(	O
Such	O
artifacts	B-Algorithm
depend	O
on	O
the	O
settings	O
used	O
in	O
the	O
JPG	O
compression	O
;	O
they	O
can	O
be	O
quite	O
noticeable	O
when	O
a	O
low-quality	O
 [ high-compression ] 	O
setting	O
is	O
used	O
.	O
)	O
</s>
<s>
JPEG	O
does	O
not	O
support	O
transparency	B-Algorithm
.	O
</s>
<s>
JPEG	O
's	O
lossy	B-Algorithm
compression	I-Algorithm
also	O
suffers	O
from	O
generation	B-General_Concept
loss	I-General_Concept
,	O
where	O
repeatedly	O
decoding	O
and	O
re-encoding	O
an	O
image	O
to	O
save	O
it	O
again	O
causes	O
a	O
loss	O
of	O
information	O
each	O
time	O
,	O
degrading	O
the	O
image	O
.	O
</s>
<s>
Because	O
PNG	O
is	O
lossless	B-Algorithm
,	O
it	O
is	O
suitable	O
for	O
storing	O
images	O
to	O
be	O
edited	O
.	O
</s>
<s>
While	O
PNG	O
is	O
reasonably	O
efficient	O
when	O
compressing	O
photographic	O
images	O
,	O
there	O
are	O
lossless	B-Algorithm
compression	I-Algorithm
formats	O
designed	O
specifically	O
for	O
photographic	O
images	O
,	O
lossless	B-Algorithm
WebP	O
and	O
Adobe	B-Application
DNG	I-Application
(	O
digital	B-Application
negative	I-Application
)	O
for	O
example	O
.	O
</s>
<s>
However	O
these	O
formats	O
are	O
either	O
not	O
widely	O
supported	O
,	O
or	O
are	O
proprietary	B-Application
.	O
</s>
<s>
An	O
image	O
can	O
be	O
stored	O
losslessly	B-Algorithm
and	O
converted	O
to	O
JPEG	O
format	O
only	O
for	O
distribution	O
,	O
so	O
that	O
there	O
is	O
no	O
generation	B-General_Concept
loss	I-General_Concept
.	O
</s>
<s>
While	O
the	O
PNG	O
specification	O
does	O
not	O
explicitly	O
include	O
a	O
standard	O
for	O
embedding	O
Exif	O
image	O
data	O
from	O
sources	O
such	O
as	O
digital	O
cameras	O
,	O
the	O
preferred	O
method	O
for	O
embedding	O
EXIF	O
data	O
in	O
a	O
PNG	O
is	O
to	O
use	O
the	O
non-critical	O
ancillary	O
chunk	B-General_Concept
label	O
eXIf	O
.	O
</s>
<s>
No	O
images	O
at	O
all	O
are	O
needed	O
to	O
display	O
gradients	O
in	O
modern	O
browsers	O
,	O
as	O
gradients	O
can	O
be	O
created	O
using	O
CSS	B-Language
.	O
</s>
<s>
JPEG-LS	O
is	O
an	O
image	O
format	O
by	O
the	O
Joint	O
Photographic	O
Experts	O
Group	O
,	O
though	O
far	O
less	O
widely	O
known	O
and	O
supported	O
than	O
the	O
other	O
lossy	B-Algorithm
JPEG	O
format	O
discussed	O
above	O
.	O
</s>
<s>
While	O
this	O
makes	O
TIFF	O
useful	O
as	O
a	O
generic	O
format	O
for	O
interchange	O
between	O
professional	O
image	B-Application
editing	I-Application
applications	O
,	O
it	O
makes	O
adding	O
support	O
for	O
it	O
to	O
applications	O
a	O
much	O
bigger	O
task	O
and	O
so	O
it	O
has	O
little	O
support	O
in	O
applications	O
not	O
concerned	O
with	O
image	B-Application
manipulation	I-Application
(	O
such	O
as	O
web	O
browsers	O
)	O
.	O
</s>
<s>
The	O
most	O
common	O
general-purpose	O
,	O
lossless	B-Algorithm
compression	I-Algorithm
algorithm	O
used	O
with	O
TIFF	O
is	O
Lempel	B-Algorithm
–	I-Algorithm
Ziv	I-Algorithm
–	I-Algorithm
Welch	I-Algorithm
(	O
LZW	B-Algorithm
)	O
.	O
</s>
<s>
TIFF	O
also	O
supports	O
the	O
compression	B-General_Concept
algorithm	I-General_Concept
PNG	O
uses	O
(	O
i.e.	O
</s>
<s>
TIFF	O
also	O
offers	O
special-purpose	O
lossless	B-Algorithm
compression	I-Algorithm
algorithms	O
like	O
CCITT	O
Group	O
IV	O
,	O
which	O
can	O
compress	O
bilevel	B-Algorithm
images	I-Algorithm
(	O
e.g.	O
,	O
faxes	O
or	O
black-and-white	O
text	O
)	O
better	O
than	O
PNG	O
's	O
compression	B-General_Concept
algorithm	I-General_Concept
.	O
</s>
<s>
PNG	O
supports	O
non-premultiplied	O
alpha	O
only	O
whereas	O
TIFF	O
also	O
supports	O
"	O
associated	O
"	O
(	O
premultiplied	B-Algorithm
)	O
alpha	O
.	O
</s>
<s>
The	O
official	O
reference	O
implementation	O
of	O
the	O
PNG	O
format	O
is	O
the	O
programming	B-Library
library	I-Library
libpng	B-Language
.	O
</s>
<s>
It	O
is	O
published	O
as	O
free	O
software	O
under	O
the	O
terms	O
of	O
a	O
permissive	B-License
free	I-License
software	I-License
license	I-License
.	O
</s>
<s>
Therefore	O
,	O
it	O
is	O
usually	O
found	O
as	O
an	O
important	O
system	B-Library
library	I-Library
in	O
free	O
operating	B-General_Concept
systems	I-General_Concept
.	O
</s>
<s>
The	O
PNG	O
format	O
is	O
widely	O
supported	O
by	O
graphics	B-Application
programs	I-Application
,	O
including	O
Adobe	B-Operating_System
Photoshop	I-Operating_System
,	O
Corel	O
's	O
Photo-Paint	B-Application
and	O
Paint	B-Application
Shop	I-Application
Pro	I-Application
,	O
the	B-Application
GIMP	I-Application
,	O
GraphicConverter	B-Operating_System
,	O
Helicon	B-Algorithm
Filter	I-Algorithm
,	O
ImageMagick	B-Language
,	O
Inkscape	B-Application
,	O
IrfanView	B-Protocol
,	O
Pixel	B-Algorithm
image	B-Application
editor	I-Application
,	O
Paint.NET	B-Language
and	O
Xara	B-Application
Photo	I-Application
&	I-Application
Graphic	I-Application
Designer	I-Application
and	O
many	O
others	O
.	O
</s>
<s>
Some	O
programs	O
bundled	O
with	O
popular	O
operating	B-General_Concept
systems	I-General_Concept
which	O
support	O
PNG	O
include	O
Microsoft	O
's	O
Paint	B-Application
and	O
Apple	O
's	O
Photos/iPhoto	O
and	O
Preview	B-Language
,	O
with	O
the	B-Application
GIMP	I-Application
also	O
often	O
being	O
bundled	O
with	O
popular	O
Linux	B-Application
distributions	O
.	O
</s>
<s>
Adobe	B-Operating_System
Fireworks	I-Operating_System
(	O
formerly	O
by	O
Macromedia	O
)	O
uses	O
PNG	O
as	O
its	O
native	O
file	O
format	O
,	O
allowing	O
other	O
image	B-Application
editors	I-Application
and	O
preview	B-Language
utilities	O
to	O
view	O
the	O
flattened	O
image	O
.	O
</s>
<s>
PNG	O
support	O
first	O
appeared	O
in	O
1997	O
,	O
in	O
Internet	B-Application
Explorer	I-Application
4.0b1	O
(	O
32-bit	O
only	O
for	O
NT	O
)	O
,	O
and	O
in	O
Netscape	B-Protocol
4.04	O
.	O
</s>
<s>
Despite	O
calls	O
by	O
the	B-Operating_System
Free	I-Operating_System
Software	I-Operating_System
Foundation	I-Operating_System
and	O
the	O
World	O
Wide	O
Web	O
Consortium	O
(	O
W3C	O
)	O
,	O
tools	O
such	O
as	O
gif2png	O
,	O
and	O
campaigns	O
such	O
as	O
Burn	O
All	O
GIFs	O
,	O
PNG	O
adoption	O
on	O
websites	O
was	O
fairly	O
slow	O
due	O
to	O
late	O
and	O
buggy	O
support	O
in	O
Internet	B-Application
Explorer	I-Application
,	O
particularly	O
regarding	O
transparency	B-Algorithm
.	O
</s>
<s>
PNG	O
compatible	O
browsers	O
include	O
:	O
Apple	B-Application
Safari	I-Application
,	O
Google	B-Application
Chrome	I-Application
,	O
Mozilla	B-Application
Firefox	I-Application
,	O
Opera	B-Application
,	O
Camino	B-Language
,	O
Internet	B-Application
Explorer	I-Application
7	I-Application
(	O
still	O
numerous	O
issues	O
)	O
,	O
Internet	B-Application
Explorer	I-Application
8	I-Application
(	O
still	O
some	O
issues	O
)	O
,	O
Internet	B-Application
Explorer	I-Application
9	I-Application
and	O
many	O
others	O
.	O
</s>
<s>
Especially	O
versions	O
of	O
Internet	B-Application
Explorer	I-Application
(	O
Windows	O
)	O
below	O
9.0	O
(	O
released	O
2011	O
)	O
have	O
numerous	O
problems	O
which	O
prevent	O
it	O
from	O
correctly	O
rendering	O
PNG	O
images	O
.	O
</s>
<s>
4.0	O
crashes	O
on	O
large	O
PNG	O
chunks	B-General_Concept
.	O
</s>
<s>
5.01	O
prints	O
palette	B-Data_Structure
images	O
with	O
black	O
(	O
or	O
dark	O
gray	O
)	O
backgrounds	O
under	O
Windows	O
98	O
,	O
sometimes	O
with	O
radically	O
altered	O
colors	O
.	O
</s>
<s>
6.0	O
fails	O
to	O
display	O
PNG	O
images	O
of	O
4097	O
or	O
4098	O
bytes	B-Application
in	O
size	O
.	O
</s>
<s>
6.0	O
cannot	O
open	O
a	O
PNG	O
file	O
that	O
contains	O
one	O
or	O
more	O
zero-length	O
IDAT	O
chunks	B-General_Concept
.	O
</s>
<s>
For	O
more	O
information	O
,	O
see	O
this	O
article	O
in	O
the	O
Microsoft	O
Knowledge	O
Base	O
:	O
MS08-024	O
:	O
Cumulative	O
Security	O
Update	O
for	O
Internet	B-Application
Explorer	I-Application
.	O
</s>
<s>
6.0	O
and	O
below	O
have	O
broken	O
alpha-channel	B-Algorithm
transparency	B-Algorithm
support	O
(	O
will	O
display	O
the	O
default	O
background	O
color	O
instead	O
)	O
.	O
</s>
<s>
7.0	O
and	O
below	O
cannot	O
combine	O
8-bit	O
alpha	B-Algorithm
transparency	I-Algorithm
AND	O
element	O
opacity	O
(	O
CSS	B-Language
–	O
filter	O
:	O
Alpha	O
(	O
opacity	O
=	O
xx	O
)	O
)	O
without	O
filling	O
partially	O
transparent	O
sections	O
with	O
black	O
.	O
</s>
<s>
PNG	O
icons	O
have	O
been	O
supported	O
in	O
most	O
distributions	O
of	O
Linux	B-Application
since	O
at	O
least	O
1999	O
,	O
in	O
desktop	O
environments	O
such	O
as	O
GNOME	B-Application
.	O
</s>
<s>
In	O
2006	O
,	O
Microsoft	B-Application
Windows	I-Application
support	O
for	O
PNG	O
icons	O
was	O
introduced	O
in	O
Windows	B-Application
Vista	I-Application
.	O
</s>
<s>
PNG	O
icons	O
are	O
supported	O
in	O
AmigaOS	B-Application
4	I-Application
,	O
AROS	B-Application
,	O
macOS	B-Application
,	O
iOS	B-Application
and	O
MorphOS	B-Operating_System
as	O
well	O
.	O
</s>
<s>
In	O
addition	O
,	O
Android	B-Application
makes	O
extensive	O
use	O
of	O
PNGs	O
.	O
</s>
<s>
Compared	O
to	O
GIF	O
files	O
,	O
a	O
PNG	O
file	O
with	O
the	O
same	O
information	O
(	O
256	O
colors	O
,	O
no	O
ancillary	O
chunks/metadata	O
)	O
,	O
compressed	O
by	O
an	O
effective	O
compressor	O
is	O
normally	O
smaller	O
than	O
a	O
GIF	O
image	O
.	O
</s>
<s>
This	O
is	O
attributed	O
to	O
the	O
performance	O
of	O
PNG	O
's	O
DEFLATE	B-Algorithm
compared	O
to	O
GIF	O
's	O
LZW	B-Algorithm
,	O
and	O
because	O
the	O
added	O
precompression	O
layer	O
of	O
PNG	O
's	O
predictive	O
filters	O
take	O
account	O
of	O
the	O
2-dimensional	O
image	O
structure	O
to	O
further	O
compress	O
files	O
;	O
as	O
filtered	O
data	O
encodes	O
differences	O
between	O
pixels	B-Algorithm
,	O
they	O
will	O
tend	O
to	O
cluster	O
closer	O
to	O
0	O
,	O
rather	O
than	O
being	O
spread	O
across	O
all	O
possible	O
values	O
,	O
and	O
thus	O
be	O
more	O
easily	O
compressed	O
by	O
DEFLATE	B-Algorithm
.	O
</s>
<s>
However	O
,	O
some	O
versions	O
of	O
Adobe	B-Operating_System
Photoshop	I-Operating_System
,	O
CorelDRAW	B-Application
and	O
MS	B-Application
Paint	I-Application
provide	O
poor	O
PNG	O
compression	O
,	O
creating	O
the	O
impression	O
that	O
GIF	O
is	O
more	O
efficient	O
.	O
</s>
<s>
color	O
depth	O
Color	O
depth	O
can	O
range	O
from	O
1	O
to	O
64	O
bits	O
per	O
pixel	B-Algorithm
.	O
</s>
<s>
ancillary	O
chunks	B-General_Concept
PNG	O
supports	O
metadata	O
—	O
this	O
may	O
be	O
useful	O
for	O
editing	O
,	O
but	O
unnecessary	O
for	O
viewing	O
,	O
as	O
on	O
websites	O
.	O
</s>
<s>
interlacing	O
As	O
each	O
pass	O
of	O
the	O
Adam7	B-Algorithm
algorithm	I-Algorithm
is	O
separately	O
filtered	O
,	O
this	O
can	O
increase	O
file	O
size	O
.	O
</s>
<s>
As	O
the	O
ultimate	O
DEFLATE	B-Algorithm
step	O
operates	O
on	O
the	O
whole	O
image	O
's	O
filtered	O
data	O
,	O
one	O
cannot	O
optimize	O
this	O
row-by-row	O
;	O
the	O
choice	O
of	O
filter	O
for	O
each	O
row	O
is	O
thus	O
potentially	O
very	O
variable	O
,	O
though	O
heuristics	O
exist	O
.	O
</s>
<s>
compression	O
With	O
additional	O
computation	O
,	O
DEFLATE	B-Algorithm
compressors	O
can	O
produce	O
smaller	O
files	O
.	O
</s>
<s>
There	O
is	O
thus	O
a	O
filesize	O
trade-off	O
between	O
high	O
color	O
depth	O
,	O
maximal	O
metadata	O
(	O
including	O
color	B-Algorithm
space	I-Algorithm
information	O
,	O
together	O
with	O
information	O
that	O
does	O
not	O
affect	O
display	O
)	O
,	O
interlacing	O
,	O
and	O
speed	O
of	O
compression	O
,	O
which	O
all	O
yield	O
large	O
files	O
,	O
with	O
lower	O
color	O
depth	O
,	O
fewer	O
or	O
no	O
ancillary	O
chunks	B-General_Concept
,	O
no	O
interlacing	O
,	O
and	O
tuned	O
but	O
computationally	O
intensive	O
filtering	O
and	O
compression	O
.	O
</s>
<s>
Although	O
PNG	O
is	O
a	O
lossless	B-Algorithm
format	I-Algorithm
,	O
PNG	O
encoders	O
can	O
preprocess	O
image	O
data	O
in	O
a	O
lossy	B-Algorithm
fashion	O
to	O
improve	O
PNG	O
compression	O
.	O
</s>
<s>
For	O
example	O
,	O
quantizing	O
a	O
truecolor	O
PNG	O
to	O
256	O
colors	O
allows	O
the	O
indexed	B-Data_Structure
color	I-Data_Structure
type	B-Device
to	O
be	O
used	O
for	O
a	O
likely	O
reduction	O
in	O
file	O
size	O
.	O
</s>
<s>
Many	O
graphics	B-Application
programs	I-Application
(	O
such	O
as	O
Apple	O
's	O
Preview	B-Language
software	O
)	O
save	O
PNGs	O
with	O
large	O
amounts	O
of	O
metadata	O
and	O
color-correction	O
data	O
that	O
are	O
generally	O
unnecessary	O
for	O
Web	O
viewing	O
.	O
</s>
<s>
Unoptimized	O
PNG	O
files	O
from	O
Adobe	B-Operating_System
Fireworks	I-Operating_System
are	O
also	O
notorious	O
for	O
this	O
since	O
they	O
contain	O
options	O
to	O
make	O
the	O
image	O
editable	O
in	O
supported	O
editors	O
.	O
</s>
<s>
Also	O
CorelDRAW	B-Application
(	O
at	O
least	O
version	O
11	O
)	O
sometimes	O
produces	O
PNGs	O
which	O
cannot	O
be	O
opened	O
by	O
Internet	B-Application
Explorer	I-Application
(	O
versions	O
6	O
–	O
8	O
)	O
.	O
</s>
<s>
Adobe	B-Operating_System
Photoshop	I-Operating_System
's	O
performance	O
on	O
PNG	O
files	O
has	O
improved	O
in	O
the	O
CS	O
Suite	O
when	O
using	O
the	O
Save	O
For	O
Web	O
feature	O
(	O
which	O
also	O
allows	O
explicit	O
PNG/8	O
use	O
)	O
.	O
</s>
<s>
This	O
stems	O
from	O
the	O
mechanics	O
of	O
its	O
Save	O
format	O
:	O
the	O
images	O
produced	O
by	O
Fireworks	O
 '	O
save	O
function	O
include	O
large	O
,	O
private	O
chunks	B-General_Concept
,	O
containing	O
complete	O
layer	O
and	O
vector	O
information	O
.	O
</s>
<s>
This	O
allows	O
further	O
lossless	B-Algorithm
editing	O
.	O
</s>
<s>
When	O
saved	O
with	O
the	O
Export	O
option	O
,	O
Fireworks	O
 '	O
PNGs	O
are	O
competitive	O
with	O
those	O
produced	O
by	O
other	O
image	B-Application
editors	I-Application
,	O
but	O
are	O
no	O
longer	O
editable	O
as	O
anything	O
but	O
flattened	O
bitmaps	O
.	O
</s>
<s>
When	O
the	O
color	O
depth	O
of	O
a	O
truecolor	O
image	O
is	O
reduced	O
to	O
an	O
8-bit	O
palette	B-Data_Structure
(	O
as	O
in	O
GIF	O
)	O
,	O
the	O
resulting	O
image	O
data	O
is	O
typically	O
much	O
smaller	O
.	O
</s>
<s>
(	O
optionally	O
)	O
removing	O
ancillary	O
chunks	B-General_Concept
,	O
</s>
<s>
use	O
a	O
palette	B-Data_Structure
(	O
instead	O
of	O
RGB	O
)	O
if	O
the	O
image	O
has	O
256	O
or	O
fewer	O
colors	O
,	O
</s>
<s>
optimizing	O
DEFLATE	B-Algorithm
compression	O
.	O
</s>
<s>
pngcrush	B-Language
is	O
the	O
oldest	O
of	O
the	O
popular	O
PNG	O
optimizers	O
.	O
</s>
<s>
Different	O
DEFLATE	B-Algorithm
implementations	O
are	O
applied	O
depending	O
on	O
the	O
selected	O
compression	O
level	O
,	O
trading	O
between	O
speed	O
and	O
file	O
size	O
:	O
zlib	B-Language
at	O
level	O
1	O
,	O
libdeflate	O
at	O
level	O
2	O
,	O
7-zip	B-Language
'	O
s	O
LZMA	B-General_Concept
DEFLATE	B-Algorithm
at	O
level	O
3	O
,	O
and	O
zopfli	B-Application
at	O
level	O
4	O
.	O
</s>
<s>
pngout	B-Application
was	O
made	O
with	O
the	O
author	O
's	O
own	O
deflater	B-Algorithm
(	O
same	O
to	O
the	O
author	O
's	O
zip	O
utility	O
,	O
kzip	O
)	O
,	O
while	O
keeping	O
all	O
facilities	O
of	O
color	O
reduction	O
/	O
filtering	O
.	O
</s>
<s>
However	O
,	O
pngout	B-Application
does	O
n't	O
allow	O
for	O
using	O
several	O
trials	O
on	O
filters	O
in	O
a	O
single	O
run	O
.	O
</s>
<s>
It	O
's	O
suggested	O
to	O
use	O
its	O
commercial	O
GUI	O
version	O
,	O
pngoutwin	O
,	O
or	O
used	O
with	O
a	O
wrapper	O
to	O
automate	O
the	O
trials	O
or	O
to	O
recompress	O
using	O
its	O
own	O
deflater	B-Algorithm
while	O
keep	O
the	O
filter	O
line	O
by	O
line	O
.	O
</s>
<s>
zopflipng	O
was	O
also	O
made	O
with	O
a	O
self-own	O
deflater	B-Algorithm
,	O
zopfli	B-Application
.	O
</s>
<s>
It	O
has	O
all	O
the	O
optimizing	O
features	O
pngcrush	B-Language
has	O
(	O
including	O
automating	O
trials	O
)	O
while	O
providing	O
a	O
very	O
good	O
,	O
but	O
slow	O
deflater	B-Algorithm
.	O
</s>
<s>
Optimizer	O
Chunk	B-General_Concept
removal	O
Color	O
reduction	O
Filtering	O
Filter	O
reuseThe	O
tools	O
offering	O
such	O
feature	O
could	O
act	O
as	O
a	O
pure	O
re-deflater	O
to	O
PNG	O
files	O
.	O
</s>
<s>
Multiple	O
trials	O
on	O
filters	O
in	O
a	O
single	O
run	O
Deflaterzlib	O
,	O
the	O
reference	O
deflate	B-Algorithm
implementation	O
,	O
compression	O
is	O
suboptimal	O
even	O
at	O
the	O
maximum	O
level	O
.	O
</s>
<s>
See	O
Zopfli	B-Application
,	O
zip	O
format	O
in	O
7-zip	B-Language
and	O
pngout	B-Application
.	O
</s>
<s>
advpng	O
Yes	O
NoNot	O
only	O
does	O
advpng	O
not	O
support	O
color	O
reduction	O
,	O
it	O
also	O
fails	O
on	O
images	O
with	O
a	O
reduced	O
colorspace	B-Algorithm
.	O
</s>
<s>
Before	O
zopflipng	O
was	O
available	O
,	O
a	O
good	O
way	O
in	O
practice	O
to	O
perform	O
a	O
png	O
optimization	O
is	O
to	O
use	O
a	O
combination	O
of	O
2	O
tools	O
in	O
sequence	O
for	O
optimal	O
compression	O
:	O
one	O
which	O
optimizes	O
filters	O
(	O
and	O
removes	O
ancillary	O
chunks	B-General_Concept
)	O
,	O
and	O
one	O
which	O
optimizes	O
DEFLATE	B-Algorithm
.	O
</s>
<s>
Although	O
pngout	B-Application
offers	O
both	O
,	O
only	O
one	O
type	B-Device
of	O
filter	O
can	O
be	O
specified	O
in	O
a	O
single	O
run	O
,	O
therefore	O
it	O
can	O
be	O
used	O
with	O
a	O
wrapper	O
tool	O
or	O
in	O
combination	O
with	O
pngcrush	B-Language
,	O
acting	O
as	O
a	O
re-deflater	O
,	O
like	O
advdef	O
.	O
</s>
<s>
For	O
removing	O
ancillary	O
chunks	B-General_Concept
,	O
most	O
PNG	O
optimization	O
tools	O
have	O
the	O
ability	O
to	O
remove	O
all	O
color	O
correction	O
data	O
from	O
PNG	O
files	O
(	O
gamma	O
,	O
white	O
balance	O
,	O
ICC	O
color	O
profile	O
,	O
standard	O
RGB	O
color	O
profile	O
)	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
following	O
command	O
line	O
options	O
achieve	O
this	O
with	O
pngcrush	B-Language
:	O
</s>
<s>
pngcrush	B-Language
,	O
pngout	B-Application
,	O
and	O
zopflipng	O
all	O
offer	O
options	O
applying	O
one	O
of	O
the	O
filter	O
types	O
0	O
–	O
4	O
globally	O
(	O
using	O
the	O
same	O
filter	O
type	B-Device
for	O
all	O
lines	O
)	O
or	O
with	O
a	O
"	O
pseudo	O
filter	O
"	O
(	O
numbered	O
5	O
)	O
,	O
which	O
for	O
each	O
line	O
chooses	O
one	O
of	O
the	O
filter	O
types	O
0	O
–	O
4	O
using	O
an	O
adaptive	O
algorithm	O
.	O
</s>
<s>
pngout	B-Application
and	O
zopflipng	O
provide	O
an	O
option	O
to	O
preserve/reuse	O
the	O
line-by-line	O
filter	O
set	O
present	O
in	O
the	O
input	O
image	O
.	O
</s>
<s>
pngcrush	B-Language
and	O
zopflipng	O
provide	O
options	O
to	O
try	O
different	O
filter	O
strategies	O
in	O
a	O
single	O
run	O
and	O
choose	O
the	O
best	O
.	O
</s>
<s>
The	O
freeware	O
command	O
line	O
version	O
of	O
pngout	B-Application
does	O
n't	O
offer	O
this	O
,	O
but	O
the	O
commercial	O
version	O
,	O
pngoutwin	O
,	O
does	O
.	O
</s>
<s>
Zopfli	B-Application
and	O
the	O
LZMA	B-General_Concept
SDK	O
provide	O
DEFLATE	B-Algorithm
implementations	O
that	O
can	O
produce	O
higher	O
compression	O
ratios	O
than	O
the	O
zlib	B-Language
reference	O
implementation	O
at	O
the	O
cost	O
of	O
performance	O
.	O
</s>
<s>
Additionally	O
,	O
PNGOUT	B-Application
contains	O
its	O
own	O
proprietary	B-Application
DEFLATE	B-Algorithm
implementation	O
.	O
</s>
<s>
By	O
contrast	O
,	O
advdef	O
from	O
the	O
same	O
package	O
does	O
n't	O
deal	O
with	O
PNG	O
structure	O
and	O
acts	O
only	O
as	O
a	O
re-deflater	O
,	O
retaining	O
any	O
existing	O
filter	O
settings	O
.	O
</s>
<s>
Since	O
icons	O
intended	O
for	O
Windows	B-Application
Vista	I-Application
and	O
later	O
versions	O
may	O
contain	O
PNG	O
subimages	O
,	O
the	O
optimizations	O
can	O
be	O
applied	O
to	O
them	O
as	O
well	O
.	O
</s>
<s>
Icons	O
for	O
macOS	B-Application
may	O
also	O
contain	O
PNG	O
subimages	O
,	O
yet	O
there	O
is	O
n't	O
such	O
tool	O
available	O
.	O
</s>
