(img, size)
return img
resize the images.

  Args:
    img: a pillow image
    size: the size of the image (both x & y)

  Returns:
    nothing
resize the images.
resize the images .
def crop(img, size):
  """resize the images.

  Args:
    img: a pillow image
    size: the size of the image (both x & y)

  Returns:
    nothing
  """
  small_side = min(img.size)
  center = img.size[0] / 2
  margin_left = center - small_side / 2
  margin_right = margin_left + small_side
  img = img.crop((margin_left, 0, margin_right, small_side))
  img = img.resize((size, size), Image.ANTIALIAS)
  return img
def crop ( img , size ) : small_side = min ( img . size ) center = img . size [ 0 ] / 2 margin_left = center - small_side / 2 margin_right = margin_left + small_side img = img . crop ( ( margin_left , 0 , margin_right , small_side ) ) img = img . resize ( ( size , size ) , Image . ANTIALIAS ) return img