Skip to content
Optimize PNG image files by removing unnecessary PNG chunks thus losslessly reducing file size.
Branch: master
Clone or download
Latest commit 656186c Mar 13, 2016

  PNG Optimizer

Details of this project can be found on the PNG Optimizer page under:


PNG Optimizer is a PNG image processing program used for compressing PNG files. It removes unnecessary PNG chunks, to loslessly reduce file size. For demonstration purpose, a pre-compiled version is included in the exe folder where you can find some executable files that can run on different platforms.


To use this code, compile it on Linux with this command:

g++ src/pngc.cpp -o pngc 

Then run the executable with





Use the following command line to compress PNG files:

pngc [files...]  

(On some operating systems this can be done by a drag and drop operation)

Warning: this will remove all unnecessary chunks. Backup before use.
After compression, only the following chunks will be left:

  • IHDR
  • IDAT
  • PLTE
  • tRNS
  • IEND

Any other chunks will be removed. This can losslessly reduce the PNG file size.

For more information about PNG chunks, read PNG Specification, Version 1.2.


PNG Optimizer can be obtained in many different ways. See details here:


Please see the file named



You can’t perform that action at this time.