![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
base64
seacozz2007
这个作者很懒,什么都没留下…
展开
-
python将url图片链接保存为base64编码
import os,base64import requests as reqfrom PIL import Imagefrom io import BytesIO# 将这个图片保存在内存response = req.get('http://img.lenovomm.com/ali/icon/app-img-lestore/4004-2017-10-21065643-1508583403130.png?isCompress=true&width=75&height=75&qu原创 2022-01-13 14:57:09 · 2275 阅读 · 0 评论 -
python - 视频转base64,图片转base64
#coding: utf-8#python3import cv2import base64from PIL import Imagefrom io import BytesIO def frame2base64(frame): img = Image.fromarray(frame) #将每一帧转为Image output_buffer = BytesIO() #创建一个BytesIO img.save(output_buffer, format='JPEG') #写入原创 2020-10-09 19:21:58 · 1069 阅读 · 0 评论