Speed improvement/optimization

Speed improvement in reading color mode data section and image data
section