Created
April 22, 2017 05:13
-
-
Save dperaltab/cea9c57ce66792f6bf1173b9fcd7afe3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
read_file = open('/tmp/newgalax.png', 'rb') | |
data = read_file.read() | |
b64 = base64.b64encode(data) | |
print (b64) | |
# Save file | |
decode_b64 = base64.b64decode(b64) | |
out_file = open('/tmp/out_newgalax.png', 'wb') | |
out_file.write(decode_b64) | |
# Test in python 3.5.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment