I have saved in a database a string return by the javascript method toDataURL. An exemple is available here: http://pastebin.com/0Qu8rngD
I need to return the image in a django response. Something like:
return HttpResponse(image, mimetype='image/png')
I have tried many methods with base64decode, urlsafe_b64decode, Image ... with no success. The navigator does not display the image, it can't read the response data.
Of course I can display my image in a HTML page with <img src="{{image}}">
, it works well.