jorge Posted February 4, 2004 Posted February 4, 2004 Ok, i've made an imageviewer, but it eat u^p a lot of memory, any pionter to fix that? below is the code i use to load the images PIT_image.Visible = False PIT_image.Image = Image.FromFile(sPath & "\" & filelist.SelectedItem) PIT_image.Update() PIT_image.Refresh() If chresize.Pushed = True Then resizeimage() Else PIT_image.Height = PIT_image.Image.Height PIT_image.Width = PIT_image.Image.Width PIT_image.Visible = True End If Quote Jorge - http://www.blackdot.be/?page=apache.htm
sjn78 Posted February 4, 2004 Posted February 4, 2004 I have done a similar thing, but mine was displaying images tiled on the screen, as in windows explorer with the thumbnail view. I found that when the page was filled with the tiled images, it could use up to 70-80mB in virtual memory. What I did was to use gc.collect after each image was drawn. This seemed to throw away a lot of the memory used to create each image and kept it down around 10-15mB of VM. Steve Quote
*Gurus* Derek Stone Posted February 5, 2004 *Gurus* Posted February 5, 2004 Call Image.Dispose() on instances of the Image class. Quote Posting Guidelines
jorge Posted February 6, 2004 Author Posted February 6, 2004 but the images are'n loaded jet, just the file names Quote Jorge - http://www.blackdot.be/?page=apache.htm
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.