percentblack1
How much coverage is there in a given 8-bit grayscale png image.
Usage
percentblack filename.png
Overview
percentblack prints a percentage coverage for a given PNG image, to three decimal places. filename.png must be 8-bit grayscale, such as is generated by GhostScript's pnggray device. Pixels which are gray make an appropriately scaled contribution to the total percentage.
Examples
percentblack filename.png
yields
4.462
indicating that 4.462% of the page is covered in black.
Requirements
percentblack only requires libpng to be present on the system.
Installation
Please see the accompanying README and INSTALL files for installation instructions. Chances are if you're reading this it's correctly installed.