C
CroDude
Hi all!
I've made a little app that creates thumbnails and if user clicks on it, it
displays the original picture in the picturebox on a panel control.
In a thumbnail mouse down event I'm using static method
Image.FromFile(string path).Something like this:
this.mainApp.pictureBox1.Image = Image.FromFile( imagePath )
Well ... the problem starts when loading a image 3200x2400x24bit which is
about 1.7 MB on disk, it takes approximately 25MB RAM when loaded??? Why ???
The problem gets worse if user clicks on the multiple thumbs(every image
thumb represents is 3200x2400) in a short amount of time.
As user clicks on each thumb, the memory usage is pilling up. For every
1.7MB picture for about 25MB. Usually GC starts cleanup near 1GB when it
hits the ceiling of my system of 1GB.
Now why GC cleans up the memory so infrequent and waits till all resources
are nearly full?
Am I missing something here. I can't believe I'm stuck on somethig stupid
like this.
Please help me, I'm near breakdown!
Thanks in advance! and Marry Christmas all!
My specs:
Athlon Barton 2.5
1 GB RAM
Win2k sp4
DOT Net 2beta
I've made a little app that creates thumbnails and if user clicks on it, it
displays the original picture in the picturebox on a panel control.
In a thumbnail mouse down event I'm using static method
Image.FromFile(string path).Something like this:
this.mainApp.pictureBox1.Image = Image.FromFile( imagePath )
Well ... the problem starts when loading a image 3200x2400x24bit which is
about 1.7 MB on disk, it takes approximately 25MB RAM when loaded??? Why ???
The problem gets worse if user clicks on the multiple thumbs(every image
thumb represents is 3200x2400) in a short amount of time.
As user clicks on each thumb, the memory usage is pilling up. For every
1.7MB picture for about 25MB. Usually GC starts cleanup near 1GB when it
hits the ceiling of my system of 1GB.
Now why GC cleans up the memory so infrequent and waits till all resources
are nearly full?
Am I missing something here. I can't believe I'm stuck on somethig stupid
like this.
Please help me, I'm near breakdown!
Thanks in advance! and Marry Christmas all!
My specs:
Athlon Barton 2.5
1 GB RAM
Win2k sp4
DOT Net 2beta