title: Image transition effect between images
body: <p>i read this post <a href="https://stackoverflow.com/a/6712572/728750">https://stackoverflow.com/a/6712572/728750</a></p>
  
  <p>and implement the code in my application but the problem is image is changing so fast because <code>timer1.Interval = 50</code> when i increase timer Interval to 300 then i found transition effect is not looking good.</p>
  
  <p>so see my code and give me suggestion that what i need to change in code as a result transition between two images should look fine and smooth but i will be able to set any interval value for my main timer.</p>
  
  <pre><code>using System;
  using System.IO;
  using System.Drawing;
  using System.Windows.Forms;
  
  namespace BlendSlideShow
  {
      public partial class Form1 : Form
      {
          private float mBlend;
          private int mDir = 1;
          public int count = 0;
          public Bitmap[] pictures;
  
          public Form1()
          {
              InitializeComponent();
  
              pictures = new Bitmap[9];
              pictures[0] = new Bitmap(GetImgFolderPath() + "img1.jpg");
              pictures[1] = new Bitmap(GetImgFolderPath() + "img2.jpg");
              pictures[2] = new Bitmap(GetImgFolderPath() + "img3.jpg");
              pictures[3] = new Bitmap(GetImgFolderPath() + "img4.jpg");
              pictures[4] = new Bitmap(GetImgFolderPath() + "img5.jpg");
              pictures[5] = new Bitmap(GetImgFolderPath() + "img6.jpg");
              pictures[6] = new Bitmap(GetImgFolderPath() + "img7.jpg");
              pictures[7] = new Bitmap(GetImgFolderPath() + "img8.jpg");
              pictures[8] = new Bitmap(GetImgFolderPath() + "img9.jpg");
  
              timer1.Interval = 50; //time of transition
              timer1.Tick += BlendTick;
              try
              {
                  blendPanel1.Image1 = pictures[count];
                  blendPanel1.Image2 = pictures[++count];
              }
              catch
              {
  
              }
              timer1.Enabled = true;
          }
  
          private string GetImgFolderPath()
          {
              string _Path = Path.GetDirectoryName(Application.ExecutablePath) + @"\..\..\images\";
              return _Path;
          }
  
          private void BlendTick(object sender, EventArgs e)
          {
              mBlend += mDir * 0.02F;
              if (mBlend &gt; 1)
              {
                  mBlend = 0.0F;
                  if ((count + 1) &lt; pictures.Length)
                  {
                      blendPanel1.Image1 = pictures[count];
                      blendPanel1.Image2 = pictures[++count];
                  }
                  else
                  {
                      blendPanel1.Image1 = pictures[count];
                      blendPanel1.Image2 = pictures[0];
                      count = 0;
                  }
              }
              blendPanel1.Blend = mBlend;
          }
      }
  }
  </code></pre>