Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

save data as image php

$data = 'data:image/png;base64,AAAFBfj42Pj4';

list($type, $data) = explode(';', $data);
list(, $data)      = explode(',', $data);
$data = base64_decode($data);

file_put_contents('/tmp/image.png', $data);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #save #data #image #php
ADD COMMENT
Topic
Name
2+2 =