load image in a for loop
<pre><code>for (int s = 1; s &lt;= NumComponents;s++ )
{
   fname = @"C:\Users\Johaira\Documents\Visual Studio 2010\Projects\SpecialProblem1\SpecialProblem1\bin\Debug\" ;
   fname2 = fname + string.Format("{0:00}.png", s);
    Bitmap inputImage = new Bitmap(fname2);

    //do some image processing here...for example thinning
}
</code></pre>

<p>I am doing image processing in c#. I have this for loop that processes each image from a directory.. the file names of my images are numbers.. but I cannot load them.. what do I do..
It works when it is not in a loop..when I call</p>

<pre><code>Bitmap inputImage = new Bitmap(@"C:\Users\Johaira\Documents\Visual Studio 2010\Projects\SpecialProblem1\SpecialProblem1\bin\Debug\1.png");
</code></pre>

<p>It is working fine..in one image only..but I want it to be dynamic so what do I do? Pls help me..thank you.</p>
