I have the following code:
echo "<img src='data:image;base64,".$apprentice[0][6]." '>";
It echoes out the picture. $apprentice[0][6] seems to be a image string. It looks like: /9j/4SyvRXhp...
I would like to write the image to the file person.jpg. I think the solution is something with file_put_contents('person.jpg', $image)
. But i dont know how to transform this imagestring or whatever it is to $image.
Does somebody know how to transform this image? I tried using imagecreatefromstring() but it did not work.
Thanks for your help.