05 2023 档案
剪贴板中的截图数据转二进制
摘要:from PIL import Image, ImageGrab import io def clip_img2byte(): im = ImageGrab.grabclipboard() if isinstance(im, Image.Image): print("Image: size : %s 阅读全文
posted @ 2023-05-24 22:18 math98 编辑
Python剪切板提取、截图、图片粘贴,操作汇总
摘要:转自:https://www.cnblogs.com/brt2/p/13232367.html 目录 1. PIL::ImageGrab(不适用于Linux) 1.1. 截图Grab 1.2. Grabclipboard 1.2.1. Error: 'NoneType' object has no 阅读全文
posted @ 2023-05-24 22:09 math98 编辑
python 图片与二进制之间的转换
摘要:一:PIL格式图片转成二进制 先读取为PIL格式,再转为二进制 import io import base64 from PIL import Image def image2byte(image): ''' 图片转byte image: 必须是PIL格式 image_bytes: 二进制 ''' 阅读全文
posted @ 2023-05-24 22:07 math98 编辑