What do you want to save?
Add Code snippet
New code examples
-
Python 2022-01-23 06:40:49
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(bas... Add solution -
Python 2021-11-17 04:16:18
django file field from base64
import base64 from django.core.files.base import ContentFile format, imgstr = data.split(';base64,') ext = format.split('/')[-1] data = ContentFile(base64.b64decode(imgstr), name='temp.' + ext) # You can save this as file instance. Add solution -
Python 2021-11-15 22:36:16
write xor decrypt python
def xor_crypt_string(data, key = 'awesomepassword', encode = False, decode = False): from itertools import izip, cycle import base64 if decode: data = base64.decodestring(data) xored = ''.join(chr(ord(x) ^ ord(y)) for (x,y) in izip(d... Add solution -
Python 2021-11-10 01:32:20
decode base64 password python
import base64 msg = base64.b64decode(msg) Add solution -
Python 2021-11-05 18:43:14
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 wri... Add solution
Best helpers
Ranking is empty