Started implementing PNG parser; not working