EDN Admin
Well-known member
I created a picture viewing app (VS2008 -- WinXP SP3 4gigs mem onboard) which functions similar to MS Picture Manager (except no editing features) and my app also drills down into subdirectories and also has a slide show feature. The app can
drill through all subdirectories from a selected parent directory and retrieves a list of picture filenames (.jpg, .bmp, .gif) which it stores in a enumerable list array type object and then displays the pictures either manually from prev/next buttons or from
the slide show in a picturebox.
I have retrieved upwards of 25,000 picture filenames to put into the picture array and let the app run continuously for hours to display each picture in the slide show. It all works fine if the average picture file size is like 500kb. But
if I cycle through a list of consecutive pictures that are like 3 megs apiece (from a digital camera for example) -- after cycling through about 30 pictures -- either manually or thru the slide show -- I get the "Out Of Memory" Error. When
I cycle through the same 30+ pictures (3 meg sized pics) in MS Picture Manager -- I do not get the "Out Of Memory" Error. This suggests that there is a solution to my problem. I have experimented with PictureBox.Image.Dispose(), but
this caused the app to not work -- maybe should I try adding an argument to ...Dispose(arg)?
Is there anything else I could do/try to solve the "Out Of Memory" problem I am having with the large picture files?
Thanks
<br/>
<br/>
View the full article
drill through all subdirectories from a selected parent directory and retrieves a list of picture filenames (.jpg, .bmp, .gif) which it stores in a enumerable list array type object and then displays the pictures either manually from prev/next buttons or from
the slide show in a picturebox.
I have retrieved upwards of 25,000 picture filenames to put into the picture array and let the app run continuously for hours to display each picture in the slide show. It all works fine if the average picture file size is like 500kb. But
if I cycle through a list of consecutive pictures that are like 3 megs apiece (from a digital camera for example) -- after cycling through about 30 pictures -- either manually or thru the slide show -- I get the "Out Of Memory" Error. When
I cycle through the same 30+ pictures (3 meg sized pics) in MS Picture Manager -- I do not get the "Out Of Memory" Error. This suggests that there is a solution to my problem. I have experimented with PictureBox.Image.Dispose(), but
this caused the app to not work -- maybe should I try adding an argument to ...Dispose(arg)?
Is there anything else I could do/try to solve the "Out Of Memory" problem I am having with the large picture files?
Thanks
<br/>
<br/>
View the full article