public HeaderedImage(Stream stream) { BinaryReader reader = new BinaryReader(stream); Width = reader.ReadInt16(); Height = reader.ReadInt16(); reader.ReadByte(); FramesCount = reader.ReadByte(); ImageData = reader.ReadBytes(Width*Height); }