Exemple #1
0
        public Stream OutputStream()
        {
            var result = new MemoryStream();

            result.Write(BFH.GetBytes());
            result.Write(DIBH.GetBytes());
            result.Write(PixelMap);
            result.Position = 0;

            return(result);
        }
Exemple #2
0
        public ARGB32WinBitmap(ushort width, ushort height) : base()
        {
            DIBH.Width        = width;
            DIBH.Height       = height;
            DIBH.BitsPerPixel = 32;

            BFH.HeaderField       = "BM";
            BFH.PixelArrayAddress = (uint)DIBH.GetBytes().Length + (uint)BFH.GetBytes().Length;

            PixelMap = new byte[width * height * 4];

            BFH.Size = (uint)BFH.GetBytes().Length + (uint)DIBH.GetBytes().Length + (uint)PixelMap.Length;
        }