vicellst-att / utils.py
polejowska's picture
Update utils.py
0eed031
raw
history blame
138 Bytes
import io
from PIL import Image
def fig2img(fig):
buf = io.BytesIO()
fig.savefig(buf)
buf.seek(0)
return Image.open(buf)