part of reading bmp file