472,789 Members | 1,286 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Graphics and large images

I have a C# application that manipulates images. The application provides
the ability to pan around the images. Normally you can "grab" the image
and move it around and it moves in real time with the mouse cursor.

There is very low friction. It slides easily.

My problem is that with larger images, it just turns to mud.
Refreshing the image, or re-drawing a screenful take so long that
trying to pan the image results in jumpy, jerky movements.

There is very high friction. It is sticky.

"Larger" images are on the order of 5000 x 10000 color jpg.

I am viewing a rectangle of the original image with no scaling
and drawing the image in OnPaint. It's all pretty standard stuff and
seems to be unresponsive to double buffering on or off.

It won't do "Big" Images at all. It just chokes trying to Image.FromFile.
I have gigaram and plenty of swap and I just don't understand why it fails
on images with a footprint over about 1.5 gig (l*w*colorbytes). Is GDI limited
to signed 32 address space?

*Interestingly*, when I single step somewhere (anywhere) in the debugger and
then continue (f5), the image will start moving easily and smoothly, of it's
own accord. This really bugs me. If the debugger can set some condition that
makes this stuff run well, then I should be able to do it too. Am I doing something
wrong? What does the debugger do to the graphics objects or memory when at

The general logic
o uses onMouseMove/Down/Up to track drags of the image
o uses DrawImage( Image,drawRect,ImgRect,GraphicsUnit.Pixel) in OnPaint
o draws scale=1:1
o use double buffering (on/off doesn't matter for purposes of slowdown)
o disposes of any created graphic objects as soon as they're not needed

I am looking forward to your suggestions,


Aug 16 '05 #1
0 1119

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

Similar topics

by: SStory | last post by:
I have a pnlControl in which I am using as a workspace on which to drag several pictures and drop them. These are bitmaps that are no more than 150x150 at the largest. I keep up with them and...
by: Tamer Abdalla via DotNetMonster.com | last post by:
Hello, everyone! I DO need some help in order to understand how to create graphics in VB.NET. I'm a little bit confused... I once knew a time when using Point & PSet was almost the only way to...
by: bullshark | last post by:
I have a C# application that manipulates images. The application provides the ability to pan around the images. Normally you can "grab" the image and move it around and it moves in real time with...
by: Nathan Sokalski | last post by:
I am trying to write code to rotate a graphic that I have. Here is the code I am currently using: Dim frogbitmap As New Bitmap(Drawing.Image.FromFile(Server.MapPath("images/frog.gif"))) Dim...
by: Andrew | last post by:
Hi, I'm trying to blit small bitmaps onto a larger bitmap, and I've got a few issues wrt positioning and output size. I think my problems are due to DPI differences... My small images are...
by: Chris Dunaway | last post by:
The method for printing documents in .Net can be confusing, especially for newer users. I would like to create a way to simplify this process. My idea would be implemented using a PrintDocument...
by: Frijoles | last post by:
Hello, I have a function that accepts an Image as the input. Currently, I load a bitmap in the calling class and pass that in. I'd like to create an overlay with another image and then pass the...
by: cartoper | last post by:
I am working on writing an Apache Module (in C/C++) that needs to resize (down) large images (4MB to 16MB) VERY quickly. The objective is not to make the images look great for printing, just look...
by: | last post by:
I've got a winForm that has a good number of custom controls with custom graphics that are stored as resources in the project. Recently, I updated all of the graphics with a new look. Added all the...
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: lllomh | last post by:
How does React native implement an English player?
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.