Construct Image Server-Side From Canvas Data
A few days ago, a friend of mine asked me to help him to get a canvas "painting" application to work on his mobile website. However, the JS .toDataURL() method isn't supported in the browser, and after checking with some guys over on Stack Overflow, it appears that todataurl-png-js will not and does not work either. However, I came across the possibility that could send over the contents of the canvas' image data to the server and have PHP construct the image based of getImageData().data as a nice work-around. Currently, I've no clue how to get this to working and when I try building the image, PHP throws the error:
"Fatal error: Cannot use string offset as an array in..."
When I echo out the contents of the data that PHP is receiving, it comes up as:
Does anyone know how to get this working? This is about the only way possible to save the canvas data to the server without to 2 aforementioned methods as far as I can tell. =/