def sample_point(image, pt):
  """ return the pixel value, or None if the point is outside image bounds

  Parameters
  ----------
  image : array_like
      The image
  pt : array_like
      The point

  Returns
  -------
  array_like
      The pixel value (None if the point is outside the image bounds)
  """
  if pt[0] >= 0 and pt[0] < image.size[0] and pt[1] >= 0 and pt[1] < image.size[1]:
    return image.getpixel(tuple(pt))
  return None