pngcrush’s loco crush option

Software

Every PNG image on this blog goes through ImageMagick to create srcset versions, then pngcrush to losslessly optimise them. The savings are routinely upwards of 40% for the same visuals, or 40pc if I go by some bizarre modern style guides.

I was reviewing my dotfile aliases, like a gentleman, and noticed pngcrush had an option I hadn’t noticed before:

-loco ("loco crush" truecolor PNGs)

From the help file:

Make the file more compressible by performing a lossless, reversible, color transformation. The resulting file is a MNG, not a PNG, and should be given the “.mng” file extension. The “loco” option has no effect on grayscale or indexed-color PNG files.

I thought it may have been a neural network trained on locomotives. Trained on locomotives? That was some top-shelf humour.

Portable Network Graphics Now!

Author bio and support

Me!

Ruben Schade is a technical writer and IaaS engineer in Sydney, Australia who refers to himself in the third person in bios. Wait, not BIOS… my brain should be EFI by now.

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite cloud infrastructure provider.

You can leave me a comment by contacting me, and I might publish your thoughts. Please read the FAQs first though.

If you found this post helpful or entertaining, you can shout me a coffee or buy some silly merch. Thanks!