public static IEnumerable <Imgd> ReadAsFac(Stream stream) { stream.SetPosition(0); while (true) { stream.AlignPosition(FacAlignment); var subStreamLength = stream.Length - stream.Position; if (subStreamLength < HeaderLength) { yield break; } yield return(Imgd.Read(new SubStream(stream, stream.Position, subStreamLength))); } }
public static IEnumerable <Imgd> Read(Stream stream) => OpenAsStream(stream.SetPosition(0)).Select(x => Imgd.Read(x)).ToArray();