Saving a PNG?

Blitz3D Forums/Blitz3D Programming/Saving a PNG?

My game need to save an image which will be uploaded and displayed on a web page. Ideally this will be PNG (the PHP library can covert this).

After a quick investigation it looks like this isn't a trivial task. Has anyone got any code to do this? I notice BMAX can save to PNG. Can I create a DLL in BMAX?