Fixing png CRC errors on Linux

How to fix PNG CRC error in Linux

How to fix CRC errors with PNG files on Linux

To check whether an image has CRC errors you can run:
`optipng broken-image.png`

You will receive a warning similar to:
`Warning: iCCP: CRC error`

if your image has CRC errors.

To quick-fix the errors, you can use imagemagick, like so:
`convert broken-image.png broken-image-fix.png`

Rerunning `optipng` on the fixed image should confirm the removal of the CRC errors (and optimize the image):
`optipng broken-image-fix.png`

♥ I hope my post was useful to you! If this post helped you solve your problem, please consider supporting me by making a small donation via my Ko-Fi page!

Hits: 387