This is a little benchmark prog I tried, to make sure that it was the IO that was taking the time before I do anything with the image.
I ended up forcing the garbage collector because as you say I was running out of memory.
When you use one of the commercial photo apps out there they seem to be able to read in and convert the same images in a fraction of the time. Surely .NET can't be making that much difference can it?
if ( openFileDialog1.FileNames != null )
{
DateTime StartTime = DateTime.Now;
System.Diagnostics.Debug.WriteLine( "Start:" + StartTime.ToLongTimeString());
int i=0;
foreach ( string FileName in openFileDialog1.FileNames )
{
i++;
Bitmap _bitmapNew;
_bitmapNew = (Bitmap)Image.FromFile( FileName, false );
_bitmapNew = null;
GC.Collect();
GC.WaitForPendingFinalizers();
}
DateTime EndTime = DateTime.Now;
System.Diagnostics.Debug.WriteLine( "End:" + EndTime.ToLongTimeString());
System.Diagnostics.Debug.WriteLine( "Loading " + i.ToString() + " Photos took " + (EndTime - StartTime) ) ;
}
}