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); }
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); }