Found codes from http://web.cs.ucdavis.edu/~amenta/s12/readBMP.cpp

http://web.cs.ucdavis.edu/~amenta/s12/bigPix.html