public static IconInfoHeader Read( Stream stream ) {
IconInfoHeader iih = new IconInfoHeader();
iih.Width = (byte)stream.ReadByte();
iih.Height = (byte)stream.ReadByte();
iih.ColorCount = (byte)stream.ReadByte();
iih.Reserved1 = (byte)stream.ReadByte();
byte[] buf = new byte[4];
stream.Read( buf, 0, 4 );
iih.Reserved2 = BitConverter.ToUInt16( buf, 0 );
iih.Reserved3 = BitConverter.ToUInt16( buf, 2 );
stream.Read( buf, 0, 4 );
iih.icoDIBSize = BitConverter.ToUInt32( buf, 0 );
stream.Read( buf, 0, 4 );
iih.icoDIBOffset = BitConverter.ToUInt32( buf, 0 );
return iih;
}
}