Note: .toDataURL() and "todataurl-png-js" are NOT usable
Say I wanted to construct an image in PHP from a canvas element's RGB data that is sent from JavaScript (getImageData), how would I accomplish this? More specifically, how would I first get the RGB data and put in the proper format (for use in PHP) and how would I assemble it properly into an image?
*Edit: It is preferred that this simply (if possible) be done from the data in getImageData().data