📜  pil.jpegimageplugin.jpegimagefile 到图像 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:10.537000             🧑  作者: Mango

代码示例1
import io
from PIL import Image

# Encode your PIL Image as a JPEG without writing to disk
buffer = io.BytesIO()
YourImage.save(buffer, format='JPEG', quality=75)

# You probably want
desiredObject = buffer.getbuffer()