import requests
from PIL import Image
from io import BytesIO
yzmdata = requests.get(图片url)
tempIm = BytesIO(yzmdata.content)
im = Image.open(tempIm)
使用PIL打开网页上的图片的方法
最新推荐文章于 2024-01-10 02:18:16 发布
import requests
from PIL import Image
from io import BytesIO
yzmdata = requests.get(图片url)
tempIm = BytesIO(yzmdata.content)
im = Image.open(tempIm)