|Hah! Turned out there were two problems with libpng on the nds:1. png_zalloc(), which allocates memory for zlib, was refusing to allocate any memory, thinking it was too much. I just removed that check and it works. Boy this was annoying to track down.
2. I forgot a FAT_fclose() in there, so the file was 0 bytes (since it never got flushed to disk)
Latest update — now no more confusion over .bin or .rle, since it directly spits out png’s!