flask decoding base 64 image

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

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
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)))