added png/bmp support, custom res, and eof fixing