def _point_on_image(point, img):
    ' check if point is on the image '
    (x, y) = point
    if ((x >= 0) and (x <= img.size[0])):
        if ((y >= 0) and (y <= img.size[1])):
            return True
    return False
check if point is on the image
def _point_on_image(point, img):
    '  '
    (x, y) = point
    if ((x >= 0) and (x <= img.size[0])):
        if ((y >= 0) and (y <= img.size[1])):
            return True
    return False