public BMPDIBHeader(byte[] headerBlock)
{
// Core Header
Width = BitConverter.ToInt32(headerBlock, 18);
Height = BitConverter.ToInt32(headerBlock, 22);
BPP = BitConverter.ToInt16(headerBlock, 28);
// Info Header (standard for Windows)
CompressionMethod = BitConverter.ToInt32(headerBlock, 30);
RawImageSize = BitConverter.ToInt32(headerBlock, 34);
HorizontalResolution = BitConverter.ToInt32(headerBlock, 38);
VerticalResolution = BitConverter.ToInt32(headerBlock, 42);
NumColoursInPalette = BitConverter.ToInt32(headerBlock, 46);
NumImportantColours = BitConverter.ToInt32(headerBlock, 50);
}