CrazyEngineers
  • Optimize PNG Images - OptiPNG

    Kaustubh Katdare

    Kaustubh Katdare

    @thebigk
    Updated: Oct 25, 2024
    Views: 1.1K
    Portable Network Graphics (PNG) is one of the most widely used image formats because it employs loss less data compression techniques. The PNG format was created to improve the traditional GIF image format. However, PNG images could be larger in sizes than JPEG or BMP formats. Let me discuss an easy technique to reduce the size of PNG images using a simple command line tool called 'OptiPNG' created by Cosmin Truta. The tool comes with lot of options, but we'll stick to the most basic ones to get the work done, fast.

    Download your OptiPNG from<a href="https://optipng.sourceforge.net/" target="_blank" rel="noopener noreferrer">OptiPNG Home Page</a>. For this tutorial, I've used OptiPNG 0.6.4, Windows EXE version. Download the zip and extract it to say C:\optipng\ folder. With this setup, your optipng.exe should be available at C:\optipng\optipng.exe. Also move the PNG images you wish to compress/optimize in the same folder (optipng). For this tutorial, I've crazyengineers.png which is whooping 11kb in size.

    Now fire up your command prompt and change the directory to c:\optipng\

    Now type following command on the command prompt -

    optipng -o2 crazengineers.png

    Note: replace the crazyengineers.png with the name of the file you wish to optimize.

    See the screenshot -

    #-Link-Snipped-#
    OptiPNG

    I got crazyengineers.png shrunk in size from 11kb to just 4kb, without any apparent loss in quality.

    In general, the command format is: optipng [-options] files. Further information can be obtained here.
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Home Channels Search Login Register