Slide Show jpg Pictures C# .NETCF 2.0 "OutOfMemoryException"
I´m developing a digital portrait photos for my pocket pc in C# whit .NET CF 2.0.
And i have a problem with memory when my board working with high resolution photos in jpg, i have a big problem because my board don´t have graphics aceleration and i need to solve this problem in software.
i was create an array with paths of my pictures in Storage Card.
private void timer1_Tick(object sender, EventArgs e)
{
if (j > pathss.Length - 1)
{
j = 0;
pictureBox1.Image = new Bitmap("" + pathss[j]);
j++;
}
else
{
pictureBox1.Image = new Bitmap("" + pathss[j]);
j++;
}
}
When my board show pictures i have the following error:
OutOfMemoryException
at Microsoft.AGL.Common.MISC.HandleAr()
at System.Drawing.Bitmap._InitFromMemoryStream()
at System.Drawing.Bitmap..ctor()
at PRD1.Form1timer1_Tick()
....
I need some function that resize my pictures in my function to display my photos.
Anybody Could help me in my problems?
Thanks
Regards.
Thiago