![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Bob. Thanks for your article on converting a bitmap to a region (http://www.bobpowell.net/region_from_bitmap.htm). I've implemented that method - and I find that when I apply the region to the form it takes a long time for the form to then reveal itself (as in 2 - 5 seconds). I assume this is because the region is quite complex, having been constructed with a lot of little data-points. The picture is no more (in fact less) complex the triumph motorcycle sample on your article....so I was wondering. Is there some way to optimize this - or speed it up - or other general work arounds if it is just a slow thing? Thanks Bob. PHiL - NZ |
#3
| |||
| |||
|
|
This can be speeded up enormously by using LockBits to get the pixels rather than GetPixel which is horribly slow. -- 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. "Phil Jones" <nospam> wrote in message news:eVRENai$GHA.1556 (AT) TK2MSFTNGP03 (DOT) phx.gbl... Bob. Thanks for your article on converting a bitmap to a region (http://www.bobpowell.net/region_from_bitmap.htm). I've implemented that method - and I find that when I apply the region to the form it takes a long time for the form to then reveal itself (as in 2 - 5 seconds). I assume this is because the region is quite complex, having been constructed with a lot of little data-points. The picture is no more (in fact less) complex the triumph motorcycle sample on your article....so I was wondering. Is there some way to optimize this - or speed it up - or other general work arounds if it is just a slow thing? Thanks Bob. PHiL - NZ |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |