vicellst-official / utils.py
polejowska's picture
Duplicate from polejowska/vicellst-att
9b3f85e
import io
from PIL import Image
def fig2img(fig):
buf = io.BytesIO()
fig.savefig(buf)
buf.seek(0)
return Image.open(buf)