Page 1 of 1

RxPixelGetColor and RxPixelSetColor too slow

Posted: Wed Nov 08, 2006 12:04 am
by rodo
Hi,

Code: Select all

for (mx = 20; mx < 25; ++mx)
{
    for (my = 20; my < 25; ++my)
    {
        RxPixelSetColor(mx+500, my+500, RxPixelGetColor(mx, my));
    }
}
Why does it take about 5 sec to finish this example?

I am using a 2.6MHz computer, VC++ .NET, Win XP, release-compiled program.

Thanks
rodo

Posted: Wed Nov 08, 2006 8:14 am
by webops
It was a bug, we fixed it for the next release.
But i think you can easily write a workaround as follows:

Code: Select all

DWORD oldSleepTime = RxGetSleepTime();
RxSetSleepTime(0);

for (mx = 20; mx < 25; ++mx) 
{ 
    for (my = 20; my < 25; ++my) 
    { 
        RxPixelSetColor(mx+500, my+500, RxPixelGetColor(mx, my)); 
    } 
} 

RxSetSleepTime(oldSleepTime);
Please try it and answer me the new time.

Jenö Herget
Ranorex Team

Posted: Wed Nov 08, 2006 6:49 pm
by rodo
Thanks for your help!

Now it takes less than 1ms.

Brds
rodo

Posted: Wed Nov 08, 2006 10:35 pm
by rodo
Hi,

is there any possibility to copy an area instead of only one point?

I'd like to copy about 1000x500 pixels - this takes about 1.5 sec using RxPixelGetColor...


Thx,
rodo

Posted: Thu Nov 09, 2006 9:50 pm
by webops
rodo wrote:is there any possibility to copy an area instead of only one point?
Not at the moment, i'm sorry.
But we will support some graphic features in future versions.

Jenö Herget
Ranorex Team