Slowness with Large Images

Shinju

Member
Joined
Jun 24, 2009
Messages
5
Location
Newcastle Upon Tyne, UK
Programming Experience
10+
Hi guys and gals. I'm a new member and also a bit of a newbie at VB.NET. I'm working in Visual Basic 2008 Express and I'm having some graphic problems.

I won't post any code just yet in case it's a known issue with a known solution (which I suspect it is)...

But I'm writing a scrolling list with icons (32x32) I have the images all stored in a single picturebox and I'm grabbing them out with drawimage. But the number of items in the list is very large (about 3000), each with individual icon so the picture I'm getting them from is also very large (640x4608 or 144 rows of 20 icons). With this large image drawimage is incredibly slow.

I've tried a test with a much smaller number of icons in the image and its so so much faster, so I'm pretty sure this is where the problem is. Is there a known solution if so what?
Would splitting the large picture into a number of smaller pictures help? If so can I create an array of picture boxes? - control arrays dont seem to be part of VB.NET - if this is a solution I could do with a hand understanding their replacement.
Thanks in advance
 
Well I have tried splitting the large image up into an array of much smaller one and it works fantastically well, its moving very smoothly now.

Unfortunately I have also realised I have another graphics routine which has the same problem only I cant apply the same solution to it - there isn't really any way of splitting it up into smaller pieces. I'm drawing a graph (of items selected in my list) the picturebox is about 1240x750 and I need to pan and zoom around it. so I'm having to redraw the contents on mouse movements.

Again the drawing of a large image is very slow, its only refreshing whenever the mouse movement stops or moves very slowly...

...any thoughts?
 
OK, no replies, does that imply that this has people stumped or that its a common/known problem without a good solution.

Or perhaps can anyone confirm that drawimage will in fact quite happily draw smoothly at this sort of resolution? If thats the case I'll post some of my code.
 

Latest posts

Back
Top