Okay, I'm not sure that I am going about this the right way, however I tried both methods described and they both failed.
Basically what I am doing is passing the image reference (the image I created using GD, i.e. $new_image = imagecreatetruecolor($new_width, $new_height)😉 to the methods described above as such:
base64_encode($new_image);
I'm receiving this warning:
Warning: base64_encode() expects parameter 1 to be string, resource given in C:\xampplite\htdocs\generate_picture.php on line 55
I expect this to be because I am passing the file reference (or pointer? dunno 🙂 ) to the function as opposed to the actual image data in memory. I am unable to retrieve this image data from the memory (I don't know how.)
Help?