now using lodepng thanks to 유병후 (libsora) for suggesting, MUCH smaller and easier