The function returns the value of the pixel with coordinates x and y in the icon a. Value v=0 means white, value v=1 means black.
Make sure to set iconsizes before!