added code to read colour as well as binary images.\
Also added logic to consider padding in bmp images