I generate the canvas and pass it to php so:
$(\'body\').on(\'click\',\'#save_image\',function(){ html2canvas($(\'.myImage\'), {
You should probably base64_decode() the data URL. It even says it in the URL itself: data:image/png;base64,...
data:image/png;base64,...
$decoded = base64_decode(str_replace('data:image/png;base64,', '', $image));