[SIZE=2]inFile = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] FileStream(FILE_NAME, FileMode.Open, FileAccess.Read)
[/SIZE][SIZE=2][COLOR=#0000ff]ReDim[/COLOR][/SIZE][SIZE=2] binaryData(inFile.Length)[/SIZE][SIZE=2][COLOR=#0000ff]
[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#008000]
[/COLOR][/SIZE][SIZE=2]inFile.Seek(Basestart, SeekOrigin.Begin)
inFile.Read(binaryData, 0, inFile.Length)
[/SIZE][SIZE=2][COLOR=#008000]
[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] sh [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Integer
[/COLOR][/SIZE][SIZE=2]sh = BitConverter.ToInt32(binaryData, 0)
[/SIZE]
[SIZE=2]
[/SIZE][SIZE=2][COLOR=#0000ff]For[/COLOR][/SIZE][SIZE=2] i = 0 [/SIZE][SIZE=2][COLOR=#0000ff]To[/COLOR][/SIZE][SIZE=2] 3[/SIZE][SIZE=2][COLOR=#008000]
[/COLOR][/SIZE][SIZE=2]Console.WriteLine(binaryData(i))
[/SIZE][SIZE=2][COLOR=#0000ff]Next
[/COLOR][/SIZE]
Dim fourbytes(3) As Byte
For i As Integer = 0 To 3
fourbytes(3 - i) = binaryData(i)
Next
Dim sh As Integer = BitConverter.ToInt32(fourbytes, 0)
[FONT=Arial][SIZE=2]
[LEFT]This mandatory four-byte binary field shall occupy
bytes one through four. It shall contain the length
[LEFT]of the logical record specifying the total number of
bytes, including every byte of all nine fields contained
in the record.[/LEFT]
[/LEFT]
[/SIZE][/FONT]
http://www.fortunecity.com/skyscraper/windows/364/bmpffrmt.htm
[B][FONT=Arial Narrow][SIZE=3]
[LEFT]11.1.9 Image data
[/LEFT]
[/B][/SIZE][/FONT][FONT=Arial][SIZE=2][LEFT]This binary field shall contain all of the highresolution
grayscale image data. Each pixel of
the uncompressed image shall be quantized to
eight bits (256 gray levels) contained in a single
byte.[/LEFT]
[/SIZE][/FONT]