Example #1
0
        public byte[] GetBytes()
        {
            var result = new byte[14];

            BinaryThings.PutBytesIntoBytes(BinaryThings.FromStringToBytes(HeaderField), result, 0);
            BinaryThings.PutBytesIntoBytes(BinaryThings.FromUintToBytes(Size), result, 2);
            BinaryThings.PutBytesIntoBytes(BinaryThings.FromUintToBytes(Reserved), result, 6);
            BinaryThings.PutBytesIntoBytes(BinaryThings.FromUintToBytes(PixelArrayAddress), result, 10);

            return(result);
        }
Example #2
0
        public byte[] GetBytes()
        {
            var result = new byte[SizeOfHeader];

            BinaryThings.PutBytesIntoBytes(BinaryThings.FromUintToBytes(SizeOfHeader), result, 0);
            BinaryThings.PutBytesIntoBytes(BinaryThings.FromUshortToBytes(Width), result, 4);
            BinaryThings.PutBytesIntoBytes(BinaryThings.FromUshortToBytes(Height), result, 6);
            BinaryThings.PutBytesIntoBytes(BinaryThings.FromUshortToBytes(Planes), result, 8);
            BinaryThings.PutBytesIntoBytes(BinaryThings.FromUshortToBytes(BitsPerPixel), result, 10);

            return(result);
        }
Example #3
0
        public byte[] GetBytes()
        {
            var result = new byte[SizeOfHeader];

            BinaryThings.PutBytesIntoBytes(BinaryThings.FromUintToBytes(SizeOfHeader), result, 0);
            BinaryThings.PutBytesIntoBytes(BinaryThings.FromUintToBytes(Width), result, 4);
            BinaryThings.PutBytesIntoBytes(BinaryThings.FromUintToBytes(Height), result, 8);
            BinaryThings.PutBytesIntoBytes(BinaryThings.FromUshortToBytes(Planes), result, 12);
            BinaryThings.PutBytesIntoBytes(BinaryThings.FromUshortToBytes(BitsPerPixel), result, 14);
            BinaryThings.PutBytesIntoBytes(BinaryThings.FromUintToBytes(Compression), result, 16);
            BinaryThings.PutBytesIntoBytes(BinaryThings.FromUintToBytes(ImageSize), result, 20);
            BinaryThings.PutBytesIntoBytes(BinaryThings.FromUintToBytes(HorResolution), result, 24);
            BinaryThings.PutBytesIntoBytes(BinaryThings.FromUintToBytes(VerResolution), result, 28);
            BinaryThings.PutBytesIntoBytes(BinaryThings.FromUintToBytes(NumberOfPalleteColors), result, 32);
            BinaryThings.PutBytesIntoBytes(BinaryThings.FromUintToBytes(NumberOfImportantColors), result, 36);

            return(result);
        }