Example #1
0
 public IEnumerable <Image> GetImageEnumerator()
 {
     if (!IsWorking && File.Exists(Options.OutputPath) && indexList != null && indexList.Count > 0)
     {
         using (FileStream fsCache = new FileStream(Options.OutputPath, FileMode.Open, FileAccess.Read, FileShare.Read))
         {
             foreach (LocationInfo index in indexList)
             {
                 using (MemoryStream ms = new MemoryStream())
                 {
                     fsCache.CopyStreamTo64(ms, index.Location, (int)index.Length);
                     yield return(Image.FromStream(ms));
                 }
             }
         }
     }
 }