title: MemoryStream.CopyTo Not working
body: <pre><code>TiffBitmapDecoder decoder = new TiffBitmapDecoder(imageStreamSource, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default);
  
  using (MemoryStream allFrameStream = new MemoryStream())
  {
      foreach (BitmapFrame frame in decoder.Frames)
      {
          using (MemoryStream ms= new MemoryStream())
          {
              JpegBitmapEncoder enc = new JpegBitmapEncoder();
              enc.Frames.Add(BitmapFrame.Create(frame));
              enc.Save(ms);
              ms.CopyTo(allFrameStream);
          }
      }
  
      Document documentPDF = new Document();
      PdfWriter writer = PdfWriter.GetInstance(documentPDF, allFrameStream);
  }
  </code></pre>
  
  <p>Always allFrameStream's <code>Length=0</code>. But each iteration I could see <code>ms.Length=989548</code>. What is the error in my code. why <code>ms.CopyTo(allFrameStream)</code> is not working?</p>