Install pngcheck on Raspberry Pi

Install pngcheck on Raspberry Pi

The pngcheck is a command line tool that checks the integrity of PNG, JNG and MNG images for corruption. This tool also can be used to print the information about an image such as size (width x height), bit depth, compression info, etc.

This tutorial explains how to install pngcheck on Raspberry Pi.

Use SSH to connect to Raspberry Pi. Execute the following commands to update the package lists and install pngcheck:

sudo apt update
sudo apt install -y pngcheck

Run the pngcheck command without any arguments to see which version has been installed and available command options:

pngcheck

In order to test download image from the Internet:

wget -O test.png https://raw.githubusercontent.com/opencv/opencv/master/samples/data/sudoku.png

Now execute the pngcheck command and provide the path of a file as argument to check if a PNG image is valid.

pngcheck test.png

The command prints OK if no errors were found, otherwise it prints ERROR.

OK: test.png (558x563, 24-bit RGB, non-interlaced, 73.4%).

If you want to completely uninstall pngcheck, run the following command:

sudo apt purge --autoremove -y pngcheck

Leave a Comment

Cancel reply

Your email address will not be published.