parameters: (image, size)
return_statement: return image.crop(box)
docstring: Cuts out a minature from the cropped background image
docstring_summary: Cuts out a minature from the cropped background image
docstring_tokens: Cuts out a minature from the cropped background image
function: def crop_thumbnail(image, size):
      """ Cuts out a minature from the cropped background image """
      max_w, max_h = size
      width, height = image.getdata().size
      new_width = int(width * float(max_h)/float(height))
      startx = int((new_width - max_w) / 2)
      image = image.resize((new_width, max_h), Image.ANTIALIAS)
      box = (startx, 0, startx + max_w, max_h)
      return image.crop(box)
function_tokens: def crop_thumbnail ( image , size ) : max_w , max_h = size width , height = image . getdata ( ) . size new_width = int ( width * float ( max_h ) / float ( height ) ) startx = int ( ( new_width - max_w ) / 2 ) image = image . resize ( ( new_width , max_h ) , Image . ANTIALIAS ) box = ( startx , 0 , startx + max_w , max_h ) return image . crop ( box )