Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

flask decoding base 64 image

from PIL import Image
from io import BytesIO
import base64

data['img'] = '''R0lGODlhDwAPAKECAAAAzMzM/////wAAACwAAAAADwAPAAACIISPeQHsrZ5ModrLl
N48CXF8m2iQ3YmmKqVlRtW4MLwWACH+H09wdGltaXplZCBieSBVbGVhZCBTbWFydFNhdmVyIQAAOw==''' 

im = Image.open(BytesIO(base64.b64decode(data)))
Comment

PREVIOUS NEXT
Code Example
Python :: How to create DataFrames 
Python :: discord.py edit messages 
Python :: make the first letter of a string upper case 
Python :: django view - APIView (retrieve, update or delete - GET, PUT, DELETE) 
Python :: how to reverse a string in python 
Python :: how to loop through string in python 
Python :: openpyxl check if worksheet exists 
Python :: class python 
Python :: python offline translate pypi 
Python :: How to rotate the 2D vector by degree in Python: 
Python :: pd.read_csv 
Python :: selenium webdriver scroll down python 
Python :: How to create role discord.py 
Python :: fillna with median , mode and mean 
Python :: get requests python 
Python :: string format zero padded int python 
Python :: default orange and blue matplotlib 
Python :: Iterate through characters of a string in python 
Python :: pandas dataframe to series 
Python :: read csv file with pandas 
Python :: python check if list 
Python :: cardano 
Python :: get last n in list python 
Python :: np.select with multiple conditions 
Python :: add metadata png PIL 
Python :: python merge list of lists 
Python :: udp server python 
Python :: move file python os 
Python :: python zip() 
Python :: setattr python 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =