all groups > dotnet drawing api > october 2007 >
You're in the

dotnet drawing api

group:

DrawImage() performance issue in GDI+



DrawImage() performance issue in GDI+ Florin (H.P.C. Consulting)
10/17/2007 7:20:04 AM
dotnet drawing api: I am using GDI+ to develop a image editor. An image consists of a list of
text controls and image controls.

I draw everything in a picture box. I use DrawImage() to draw the image
layers, but the performance is very bad, especially when the user drags an
image (i have implemented a drag and drop system using mouse move and up-down
events).

Please let me know if there is a way to improve the speed of DrawImage() in
Re: DrawImage() performance issue in GDI+ Bob Powell [MVP]
10/17/2007 8:01:31 PM
Your drawing system must absolutely use a 32BppPArgp pixel format. If
your original image isn't in this format you must convert it by creating
an image of equivalent size in this format and copying it to that.

This will improve your drawing reaction times by an order of magnitude.

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

Ramuseco Limited .NET consulting
http://www.ramuseco.com

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.





[quoted text, click to view]
AddThis Social Bookmark Button