scroll + DrawImage

K

krishnan

Hi Guys

My project is to dispaly the image in a usercontrol. and user will be able
to scroll it.

But when the image is too large (say width = 2592,Height=1952) the scrolling
becomes slow.. means repaining become slow.

Am using DrawImage for displaying the imag. and used TranslateTransform for
acheving scrolling..


Where the things went to wrong . Pls corrcet me

Regards
Krishnan
 
B

Bob Powell [MVP]

The only reason for this is the size of the image. 2592*1952*4 is
20+megabytes so the processor might be doing all sorts of things including
shuffling portions of the image to and from virtual memory. Aside from
putting large amounts of memory in the machine there's not a lot you can do.

The only advantages you may be able to gain will be by ensuring that the
image is in a bitmap with 32BppPargb pixel format. and all interpolation is
turned off. (nearestneighbor)

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top