from PIL import Image
# 打开图像文件
image = Image.open('Inverter.png')
# 转换图像为RGB模式
image = image.convert('RGB')
# 获取图像的宽度和高度
width
用 Python将 png 图片转换为颜色深度为16的数组
于 2023-09-26 23:40:49 首次发布
from PIL import Image
# 打开图像文件
image = Image.open('Inverter.png')
# 转换图像为RGB模式
image = image.convert('RGB')
# 获取图像的宽度和高度
width