title: AForge.NET -> AVIWriter Adding Images as Frames
body: <p>I want to make a video from images, and each image should stay for one second. 
  The AVIWriter has 25 frames rate, so i have to add one image 25 times to make it stay for one second. </p>
  
  <p>I tried changing the frame-rate, but it is not working.</p>
  
  <p>Can anyone suggest a workaround?</p>
  
  <p>The following is the code for writing frames into video:</p>
  
  <pre><code>    private void writeVideo()
      {
          // instantiate AVI writer, use WMV3 codec
          AVIWriter writer = new AVIWriter("wmv3");
          // create new AVI file and open it
          writer.Open(fileName, 320, 240);
          // create frame image
          Bitmap image = new Bitmap(320, 240);
          var cubit = new AForge.Imaging.Filters.ResizeBilinear(320, 240);
          string[] files = Directory.GetFiles(imagesFolder);
          writer.FrameRate = 25;
          int index = 0;
          int failed = 0;
          foreach (var item in files)
          {
              index++;
              try
              {
                  image = Image.FromFile(item) as Bitmap;
                  //image = cubit.Apply(image);
  
                  for (int i = 0; i &lt; 25; i++)
                  {
                      writer.AddFrame(image); 
                  }   
              }
              catch
              {
                  failed++;
              }
              this.Text = index + " of " + files.Length + ". Failed: " + failed;
          }
          writer.Close();
      }
  </code></pre>