Implement basic functionality of reading a PNG file.