<s>
pngcrush	B-Language
is	O
a	O
free	B-Application
and	O
open-source	B-Application
command-line	B-Application
utility	O
for	O
optimizing	O
PNG	O
image	O
files	O
.	O
</s>
<s>
It	O
reduces	O
the	O
size	O
of	O
the	O
file	O
losslessly	B-Algorithm
that	O
is	O
,	O
the	O
resulting	O
"	O
crushed	O
"	O
image	O
will	O
have	O
the	O
same	O
quality	O
as	O
the	O
source	O
image	O
.	O
</s>
<s>
The	O
main	O
purpose	O
of	O
pngcrush	B-Language
is	O
to	O
reduce	O
the	O
size	O
of	O
the	O
PNG	O
IDAT	O
data	O
stream	O
by	O
trying	O
various	O
combinations	O
of	O
compression	O
methods	O
and	O
delta	O
filters	O
.	O
</s>
<s>
The	O
main	O
use	O
of	O
pngcrush	B-Language
is	O
for	O
reducing	O
the	O
size	O
of	O
the	O
image	O
data	O
contained	O
in	O
the	O
IDAT	O
section	O
.	O
</s>
<s>
The	O
pixel	O
data	O
in	O
a	O
PNG	O
file	O
is	O
compressed	O
using	O
LZ77	O
algorithm	O
(	O
which	O
tries	O
to	O
find	O
repeated	O
byte	O
sequences	O
in	O
the	O
source	O
data	O
)	O
,	O
and	O
then	O
further	O
compressed	O
with	O
Huffman	B-General_Concept
algorithm	I-General_Concept
.	O
</s>
<s>
This	O
combination	O
is	O
referred	O
to	O
as	O
deflate	B-Algorithm
compression	I-Algorithm
.	O
</s>
<s>
pngcrush	B-Language
compresses	O
the	O
image	O
with	O
multiple	O
different	O
combinations	O
and	O
then	O
stores	O
the	O
smallest	O
of	O
the	O
resulting	O
files	O
.	O
</s>
<s>
Since	O
it	O
is	O
not	O
possible	O
to	O
go	O
through	O
all	O
the	O
combinations	O
,	O
pngcrush	B-Language
uses	O
heuristics	O
to	O
choose	O
the	O
methods	O
to	O
try	O
.	O
</s>
<s>
By	O
default	O
,	O
pngcrush	B-Language
uses	O
just	O
a	O
few	O
common	O
methods	O
to	O
crush	O
the	O
file	O
.	O
</s>
<s>
The	O
optional	O
"	O
-brute	O
"	O
argument	O
can	O
be	O
used	O
for	O
brute	B-Algorithm
force	I-Algorithm
crushing	O
,	O
which	O
will	O
try	O
176	O
different	O
crushing	O
methods	O
on	O
version	O
1.8.12	O
and	O
later	O
or	O
148	O
crushing	O
methods	O
on	O
versions	O
1.7.45	O
through	O
1.8.11	O
.	O
</s>
<s>
One	O
of	O
pngcrush	B-Language
's	O
features	O
is	O
the	O
ability	O
to	O
remove	O
all	O
the	O
color-correction	O
data	O
(	O
gamma	O
,	O
white	B-Algorithm
balance	I-Algorithm
,	O
ICC	O
color	O
profile	O
,	O
standard	O
RGB	O
color	O
profile	O
)	O
from	O
PNG	O
files	O
.	O
</s>
<s>
pngcrush	B-Language
,	O
when	O
told	O
,	O
will	O
also	O
losslessly	B-Algorithm
reduce	O
the	O
bit-depth	O
of	O
images	O
or	O
apply	O
a	O
color	B-Data_Structure
palette	I-Data_Structure
when	O
possible	O
if	O
doing	O
so	O
results	O
in	O
a	O
smaller	O
file	O
size	O
.	O
</s>
<s>
pngcrush	B-Language
can	O
be	O
used	O
to	O
change	O
the	O
color	O
encoding	O
of	O
an	O
image	O
.	O
</s>
<s>
For	O
example	O
,	O
if	O
an	O
image	O
contains	O
10	O
colors	O
but	O
has	O
a	O
color	B-Data_Structure
palette	I-Data_Structure
of	O
256	O
entries	O
(	O
8-bit	O
)	O
,	O
pngcrush	B-Language
can	O
be	O
used	O
to	O
reduce	O
the	O
color	B-Data_Structure
palette	I-Data_Structure
to	O
a	O
4-bit	O
one	O
and	O
truncate	O
the	O
palette	B-Data_Structure
to	O
10	O
entries	O
.	O
</s>
<s>
pngcrush	B-Language
can	O
also	O
change	O
the	O
color	O
type	O
of	O
the	O
image	O
.	O
</s>
<s>
Greyscale	O
images	O
are	O
generally	O
smaller	O
than	O
truecolor	O
images	O
because	O
,	O
in	O
addition	O
to	O
the	O
optional	O
alpha	B-Algorithm
channel	I-Algorithm
,	O
only	O
one	O
8-bit	O
channel	O
is	O
used	O
per	O
pixel	O
rather	O
than	O
three	O
.	O
</s>
<s>
Greyscale	O
images	O
are	O
also	O
generally	O
smaller	O
than	O
paletted	O
images	O
because	O
they	O
do	O
not	O
need	O
to	O
define	O
a	O
color	B-Data_Structure
palette	I-Data_Structure
.	O
</s>
<s>
For	O
a	O
truecolor-alpha	O
image	O
,	O
changing	O
the	O
color	O
type	O
from	O
6	O
to	O
2	O
removes	O
the	O
alpha	B-Algorithm
channel	I-Algorithm
.	O
</s>
<s>
With	O
pngcrush	B-Language
,	O
a	O
user	O
can	O
edit	O
or	O
remove	O
those	O
ancillary	O
chunks	O
.	O
</s>
