331:
104:
27:
245:
There are five possible filter types that can be specified separately on each scan line and several possible strategies for searching LZ77 matches. Thus, there are a very large number of different combinations for how the image can be compressed. Which combination gives the best compression will
318:
PNG images contain chunks with information about the image, such as its resolution (the phys chunk), the time it was last modified (the tIME chunk), and textual metadata (the text chunk and its variants). With pngcrush, a user can edit or remove those ancillary chunks.
284:
Since most graphics software embed the extra color-correction data, which is normally not needed, removing it can produce file sizes that are up to 40% smaller than the original. pngcrush, when told, will also losslessly reduce the bit-depth of images or apply a
297:
pngcrush can be used to change the color encoding of an image. For example, if an image contains 10 colors but has a color palette of 256 entries (8-bit), pngcrush can be used to reduce the color palette to a 4-bit one and truncate the palette to 10 entries.
301:
pngcrush can also change the color type of the image. For a true-color image, changing the color type from 2 to 0 converts it to greyscale. Greyscale images are generally smaller than truecolor images because, in addition to the optional
249:
pngcrush compresses the image with multiple different combinations and then stores the smallest of the resulting files. Since it is not possible to go through all the combinations, pngcrush uses heuristics to choose the methods to try.
306:, only one 8-bit channel is used per pixel rather than three. Greyscale images are also generally smaller than paletted images because they do not need to define a
211:
by trying various combinations of compression methods and delta filters. It can also be used for various manipulations of PNG images, such as changing the
584:
589:
257:
crushing, which will try 176 different crushing methods on version 1.8.12 and later or 148 crushing methods on versions 1.7.45 through 1.8.11.
336:
594:
518:
499:
579:
77:
253:
By default, pngcrush uses just a few common methods to crush the file. The optional "-brute" argument can be used for
51:
216:
208:
201:
197:
289:
when possible if doing so results in a smaller file size. All ancillary chunks and text chunks can be removed.
117:
234:
algorithm (which tries to find repeated byte sequences in the source data), and then further compressed with
204: – that is, the resulting "crushed" image will have the same quality as the source image.
193:
190:
307:
227:
The main use of pngcrush is for reducing the size of the image data contained in the IDAT section.
136:
254:
514:
495:
394:
310:. For a truecolor-alpha image, changing the color type from 6 to 2 removes the alpha channel.
303:
274:
141:
266:
148:
124:
103:
560:
543:
235:
154:
129:
421:
573:
369:
286:
270:
186:
265:
One of pngcrush's features is the ability to remove all the color-correction data (
242:. Before compressing, non-destructive delta filters are applied on the pixel data.
26:
406:
380:
212:
564:
443:
326:
37:
219:, or adding certain chunks including gAMA, tRNS, iCCP, and textual chunks.
548:
536:
239:
165:
465:
349:
344:
86:
492:
Even Faster Web Sites: Essential
Knowledge for Frontend Engineers
556:
552:
395:"PNG and MNG tools - Browse /pngcrush/1.8.13 at SourceForge.net"
231:
278:
207:
The main purpose of pngcrush is to reduce the size of the PNG
261:
Reducing file size by removing color-correction data
160:
147:
135:
123:
113:
76:
50:
36:
230:The pixel data in a PNG file is compressed using
246:depend on the individual image's properties.
200:image files. It reduces the size of the file
8:
19:
102:
25:
18:
466:"The Sad Story of PNG Gamma "Correction""
361:
238:. This combination is referred to as
7:
513:. Academic Press. pp. 386–388.
337:Free and open-source software portal
57:1.8.13 / 29 August 2017
14:
464:Sivonen, Henri (21 April 2003).
329:
494:. O'Reilly Media. p. 142.
314:Chunk and metadata manipulation
281:color profile) from PNG files.
585:Free data compression software
544:pngutils for the Win32 console
1:
590:Free software programmed in C
511:Lossless Compression Handbook
422:"A guide to PNG optimization"
420:Cosmin Truta (10 May 2008).
611:
16:Command-line PNG optimiser
595:Portable Network Graphics
72:
46:
24:
509:Sayood, Khalid (2003).
490:Souders, Steve (2009).
196:utility for optimizing
580:Free graphics software
215:, removing unwanted
59:; 7 years ago
42:Glenn Randers-Pehrson
370:"pngcrush changelog"
240:deflate compression
21:
293:Image manipulation
275:ICC color profile
236:Huffman algorithm
180:
179:
602:
559:+ instructions,
540:
539:
537:Official website
524:
505:
477:
476:
474:
472:
461:
455:
454:
452:
450:
439:
433:
432:
430:
428:
417:
411:
410:
404:
402:
397:. 29 August 2017
391:
385:
384:
378:
376:
366:
339:
334:
333:
332:
217:ancillary chunks
209:IDAT data stream
176:
173:
171:
169:
167:
125:Operating system
106:
101:
98:
96:
94:
92:
90:
88:
67:
65:
60:
29:
22:
610:
609:
605:
604:
603:
601:
600:
599:
570:
569:
551:with optimized
535:
534:
531:
521:
508:
502:
489:
486:
484:Further reading
481:
480:
470:
468:
463:
462:
458:
448:
446:
442:Whedon, David.
441:
440:
436:
426:
424:
419:
418:
414:
400:
398:
393:
392:
388:
374:
372:
368:
367:
363:
358:
335:
330:
328:
325:
316:
295:
263:
225:
164:
142:Image optimizer
109:
85:
68:
63:
61:
58:
32:
31:pngcrush 1.8.13
17:
12:
11:
5:
608:
606:
598:
597:
592:
587:
582:
572:
571:
568:
567:
546:
541:
530:
529:External links
527:
526:
525:
519:
506:
500:
485:
482:
479:
478:
456:
444:"man pngcrush"
434:
412:
386:
360:
359:
357:
354:
353:
352:
347:
341:
340:
324:
321:
315:
312:
294:
291:
262:
259:
224:
223:Main operation
221:
178:
177:
162:
158:
157:
155:libpng License
151:
145:
144:
139:
133:
132:
130:Cross-platform
127:
121:
120:
115:
111:
110:
108:
107:
82:
80:
74:
73:
70:
69:
56:
54:
52:Stable release
48:
47:
44:
43:
40:
34:
33:
30:
15:
13:
10:
9:
6:
4:
3:
2:
607:
596:
593:
591:
588:
586:
583:
581:
578:
577:
575:
566:
562:
558:
554:
550:
549:pngcrush fork
547:
545:
542:
538:
533:
532:
528:
522:
520:0-12-620861-1
516:
512:
507:
503:
501:0-596-52230-4
497:
493:
488:
487:
483:
467:
460:
457:
445:
438:
435:
423:
416:
413:
408:
396:
390:
387:
382:
371:
365:
362:
355:
351:
348:
346:
343:
342:
338:
327:
322:
320:
313:
311:
309:
308:color palette
305:
304:alpha channel
299:
292:
290:
288:
287:color palette
282:
280:
276:
272:
271:white balance
268:
260:
258:
256:
251:
247:
243:
241:
237:
233:
228:
222:
220:
218:
214:
210:
205:
203:
199:
195:
192:
188:
184:
175:
163:
159:
156:
152:
150:
146:
143:
140:
138:
134:
131:
128:
126:
122:
119:
116:
112:
105:
100:
84:
83:
81:
79:
75:
71:
55:
53:
49:
45:
41:
39:
35:
28:
23:
510:
491:
469:. Retrieved
459:
447:. Retrieved
437:
425:. Retrieved
415:
405:– via
399:. Retrieved
389:
379:– via
373:. Retrieved
364:
317:
300:
296:
283:
264:
252:
248:
244:
229:
226:
206:
194:command-line
182:
181:
168:.sourceforge
38:Developer(s)
471:8 September
407:SourceForge
381:SourceForge
277:, standard
255:brute force
191:open-source
153:Similar to
574:Categories
565:CloudFlare
356:References
202:losslessly
114:Written in
78:Repository
64:2017-08-29
561:developed
213:bit depth
172:/pngcrush
323:See also
183:pngcrush
20:pngcrush
449:31 July
427:31 July
401:27 July
375:27 July
161:Website
149:License
62: (
555:using
517:
498:
350:Zopfli
345:PNGOUT
267:gamma
185:is a
99:/code
89:.code
557:SSE2
553:zlib
515:ISBN
496:ISBN
473:2017
451:2010
429:2010
403:2018
377:2018
232:LZ77
189:and
187:free
137:Type
97:/pmt
93:.net
563:by
279:RGB
198:PNG
170:.io
166:pmt
91:.sf
87:git
576::
273:,
269:,
95:/p
523:.
504:.
475:.
453:.
431:.
409:.
383:.
174:/
118:C
66:)
Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.