flask decoding base 64 image

Solutions on MaxInterview for flask decoding base 64 image by the best coders in the world

showing results for - "flask decoding base 64 image"
Jonah
29 Sep 2018
1from PIL import Image
2from io import BytesIO
3import base64
4
5data['img'] = '''R0lGODlhDwAPAKECAAAAzMzM/////wAAACwAAAAADwAPAAACIISPeQHsrZ5ModrLl
6N48CXF8m2iQ3YmmKqVlRtW4MLwWACH+H09wdGltaXplZCBieSBVbGVhZCBTbWFydFNhdmVyIQAAOw==''' 
7
8im = Image.open(BytesIO(base64.b64decode(data)))