Read the whole image out of the file instead of byte by byte. Small speed improvement. Little cleaner.