def crop_hint(photo_file):
 service = get_service()
 with open(photo_file, 'rb') as image:
  image_content = base64.b64encode(image.read())
 service_request = service.images().annotate(body={'requests': [{'image': {'content': image_content.decode('UTF-8')}, 'features': [{'type': 'CROP_HINTS'}]}]})
 response = service_request.execute()
 print json.dumps(response, indent=2)

def crop_hint ( photo_file ) : service = get_service ( ) with open ( photo_file , 'rb' ) as image : image_content = base64 . b64encode ( image . read ( ) ) service_request = service . images ( ) . annotate ( body = { 'requests' : [ { 'image' : { 'content' : image_content . decode ( 'UTF-8' ) } , 'features' : [ { 'type' : 'CROP_HINTS' } ] } ] } ) response = service_request . execute ( ) print json . dumps ( response , indent = 2 )
run a crop hint request on the image .