Ejemplo n.º 1
0
        /// <summary>
        /// Reads the <see cref="BmpFileHeader"/> from the stream.
        /// </summary>
        private void ReadFileHeader()
        {
            byte[] buffer = new byte[BmpFileHeader.Size];

            this.stream.Read(buffer, 0, BmpFileHeader.Size);

            this.fileHeader = BmpFileHeader.Parse(buffer);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Reads the <see cref="BmpFileHeader"/> from the stream.
        /// </summary>
        private void ReadFileHeader()
        {
#if NETCOREAPP2_1
            Span <byte> buffer = stackalloc byte[BmpFileHeader.Size];
#else
            byte[] buffer = new byte[BmpFileHeader.Size];
#endif
            this.stream.Read(buffer, 0, BmpFileHeader.Size);

            this.fileHeader = BmpFileHeader.Parse(buffer);
        }