Added the searching of the brightest/darkest point and average value.

Added a function which gets the brightest/darkest point of the image (and its coordinates) and another which find the average value.Tested on chrome.