RxPixelGetColor and RxPixelSetColor too slow

Bug reports.
rodo
Posts: 10
Joined: Tue Nov 07, 2006 11:27 pm

RxPixelGetColor and RxPixelSetColor too slow

Post by rodo » Wed Nov 08, 2006 12:04 am

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

admin
Site Admin
Site Admin
Posts: 350
Joined: Wed Jul 05, 2006 7:44 pm

Post by admin » Wed Nov 08, 2006 8:14 am

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

rodo
Posts: 10
Joined: Tue Nov 07, 2006 11:27 pm

Post by rodo » Wed Nov 08, 2006 6:49 pm

Thanks for your help!

Now it takes less than 1ms.

Brds
rodo

rodo
Posts: 10
Joined: Tue Nov 07, 2006 11:27 pm

Post by rodo » Wed Nov 08, 2006 10:35 pm

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

admin
Site Admin
Site Admin
Posts: 350
Joined: Wed Jul 05, 2006 7:44 pm

Post by admin » Thu Nov 09, 2006 9:50 pm

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