2
我使用下面的代碼:基於如何從圖像url(jpeg)讀取字節並在Python 2.7中對base64進行編碼?
import urllib, cStringIO
from PIL import Image
url='https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png'
file = cStringIO.StringIO(urllib.urlopen(url).read())
img = Image.open(file)
:How do I read image data from a URL in Python?
現在我需要Base64編碼,它發佈到谷歌雲願景API。怎麼做?
或者Google雲視覺API是否可以與圖像網址一起使用?