I have a simple png writer too if that's of use to you https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff image.d and png.d. Somewhat suboptimal to use, since I ported some of my old C code almost directly to it, and it still works like C.