473,396 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

scroll + DrawImage

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
Nov 16 '05 #1
2 2682
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.

"krishnan" <kd*****@hotmail.com> wrote in message
news:OU**************@TK2MSFTNGP09.phx.gbl...
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

Nov 16 '05 #2
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.

"krishnan" <kd*****@hotmail.com> wrote in message
news:OU**************@TK2MSFTNGP09.phx.gbl...
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

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: delong | last post by:
Hi I am trying to display a large image on the form and make the form scrollable. My image is about 4200 x 7000 pixel. private void Form1_Paint(object sender,...
3
by: Jeroen Ceuppens | last post by:
Hi, When i do this in my programma, in the contstructor of the form: g.DrawImage(i,new Rectangle(0,0,i.Width,i.Height),0,0,i.Width,i.Height,GraphicsUnit.Pixel); it doens't paint it ;( but if...
1
by: Ivan | last post by:
Hi there I'm trying to use BitBlt function instead od DrawImage beacuse I need speed in my app. I have one Bitmap (bmp) that is loaded from file and I use it in OnPaint for drawing. Currently I...
5
by: Frecklefoot | last post by:
I'm using DrawImage() to copy one image onto another, larger one. I'm using a DrawImage() overload to stretch the source image onto the destination. The problem is that when it draws the stretched...
3
by: Alberto | last post by:
I'm trying to load an image in a PictureBox but I want the PictureBox has always the same size and if the image is bigger, show a scrollBars. How can I do it? Thank you
0
by: news | last post by:
Hi guys, Am I right in thinking that the DrawImage method will only render in 8bits/pixel ? I have the following code (assume my16bitImage is a 16bit bitmap in memory) .... myMatrix = new...
0
by: Jon Slaughter | last post by:
I'm manually displaying images in a TreeView but when I stick the images in the Images(icons) container in the TreeView and use DrawImage they look like crap but when I force an icon draw and use...
6
by: Lev Elbert | last post by:
Using DrawImage I draw (in OnPaint) a bitmap on a form protected override void OnPaint(PaintEventArgs e) { if (_album.Count 0) { // Paint the current image Photograph photo =...
8
by: Phil | last post by:
Is it possible to find the size of the MDIClient area, excluding the space already used by docked controls? I have thought I could perhaps create a new control, set it's Dock property to Fill and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.