CSharpImageLibrary.Headers.BMP_Header.BMPDIBHeader.BMPDIBHeader C# (CSharp) Method

BMPDIBHeader() public method

Reads the detailed DIB header from a full file-DIB header block.
public BMPDIBHeader ( byte headerBlock ) : System
headerBlock byte
return System
            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);
            }
BMP_Header.BMPDIBHeader