[RESOLVED] Saving Base64 image.
Hello, I would like to know if one of you can help out.
I need to convert base64 code into a jpg image and save it to a folder within my server as a jpg image.
Whats the best way to do this?
$string contains the base64 code of the image.
I have been able to display the base64 image online in a html page. But i can't seem to find any code to convert base64 into jpg and save it to a folder.
I would be very grateful if one of u can help out with this.
High Energy Magic Dept.
$img = imagecreatefromstring(base64_decode($string));
if($img != false)
Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be." ~ from Nation, by Terry Pratchett
"But the main reason that any programmer learning any new language thinks the new language is SO much better than the old one is because he’s a better programmer now!" ~ http://www.oreillynet.com/ruby/blog/...ck_to_p_1.html
Thanks man. That did the trick.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)