Added functions to read png files... untested.
Fixed some offset bugs, PNG should work now for some images (#50, note: it's quick and dirty!)