Answers for "convert base64 to image python"

1

convert base64 to image python

import base64
image = open('deer.gif', 'rb')
image_read = image.read()
image_64_encode = base64.encodestring(image_read)
image_64_decode = base64.decodestring(image_64_encode) 
image_result = open('deer_decode.gif', 'wb') # create a writable image and write the decoding result
image_result.write(image_64_decode)
Posted by: Guest on June-08-2021

Code answers related to "convert base64 to image python"

Python Answers by Framework

Browse Popular Code Answers by Language