'**SUMMARY**
This method returns True if the feature is less than `tolerance`
pixels away from the nearest edge.
**PARAMETERS**
* *tolerance* - the distance in pixels at which a feature qualifies
as being on the image edge.
**RETURNS**
True if the feature is on the edge, False otherwise.
**EXAMPLE**
>>> img = Image("../sampleimages/EdgeTest1.png")
>>> b = img.findBlobs()
>>> if(b[0].onImageEdge()):
>>>     print "HELP! I AM ABOUT TO FALL OFF THE IMAGE"'

def onImageEdge(self, tolerance=1):

    return (self.distanceToNearestEdge() <= tolerance)
