Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...