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

Load() protected method

Loads BMP header from stream.
protected Load ( Stream stream ) : long
stream Stream Fully formatted BMP image.
return long
        protected override long Load(Stream stream)
        {
            base.Load(stream);
            byte[] temp = stream.ReadBytes(HeaderSize);

            if (!CheckIdentifier(temp))
                throw new FormatException("Stream is not a BMP Image");

            FileHeader = new BMPFileHeader(temp);
            DIBHeader = new BMPDIBHeader(temp);

            Width = DIBHeader.Width;
            Height = DIBHeader.Height;

            return HeaderSize;
        }