SavePixmapPNG to network stream?

BlitzMax Forums/BlitzMax Programming/SavePixmapPNG to network stream?

Raph(Posted 2007) [#1]
I'm trying to do a file upload routine to a standard image upload form in PHP. I have done a bunch of stuff already with POST to the web, and I believe I've successfully written the header to the stream for a multipart upload.

I am getting an exception thrown when I attempt to savePixmapPNG() to the network stream. It seems to get most of the way through, then throws the exception at the end of the file.

First question: is it indeed possible to do this in this manner? Or do I have to instead write my own routine to puts bytes into the stream?

Second question: if it is indeed possible, what do I need to do in order to avoid the exception and proceed on my merry way? Looking at the docs, it looks like the exceptions are thrown in part because it is finding the file incomplete somehow... (tho this is a pixmap in memory and I can draw it just fine, or save it locally).

If anyone already has a handy POST file upload routine for images, I'd welcome it. :)