I'm looking for a faster way to load JPEG (or PNG?) into a .NET Bitmap on Windows Mobile...
I've just had a go at loading JPEG, PNG and GIF:
for (int i = 0; i < files.Length; i++)
{
int tries = 10;
while (--tries > 0)
{
int size = (int)new FileInfo(files[i]).Length;
FileStream fs = new FileStream(files[i], FileMode.Open);
sw.Reset();
sw.Start();
Bitmap b2 = new Bitmap(fs);
sw.Stop();
Debug.WriteLine(files[i] + "\n\t" +
sw.ElapsedMilliseconds.ToString());
fs.Close();
}
}
JPEG (medium) 100ms~
JPEG (medium prog.) 200ms~
PNG (64 colour) 50ms~
GIF (32 dith) 50ms~
The managed Bitmap class probably isn't the fastest - but does anyone know for sure?