Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python convert image to base64

def cvt_2_base64(file_name):
    with open(file_name , "rb") as image_file :
        data = base64.b64encode(image_file.read())
    return data.decode('utf-8')
Source by code.tutsplus.com #
 
PREVIOUS NEXT
Tagged: #python #convert #image
ADD COMMENT
Topic
Name
1+2 =