We have developed a script to take website screenshots using PHP and exec commands with IExplorer.
However, screenshots from some sites are only the header or o full white page because IExplorer couldn't load the page or it took to long.
As a result, we are getting white images or images with 70% or 80% white space. Therefore we need a PHP function using GD library to read the image and return the percentage of the image that is white. As this are small images about 250x200 px it won't take long to go pixel by pixel. Other solutions are also accepted as long as it returns the percentage of white space.