PHP script to evaluate the average color in an image