Ranorex

RxPixelGetColor and RxPixelSetColor too slow

 
Post new topic   Reply to topic    Ranorex Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
rodo



Joined: 08 Nov 2006
Posts: 10

PostPosted: Wed Nov 08, 2006 1:04 am    Post subject: RxPixelGetColor and RxPixelSetColor too slow
Hi,

Code: click into code to enlarge

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
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 05 Jul 2006
Posts: 351

PostPosted: Wed Nov 08, 2006 9:14 am    Post subject:
It was a bug, we fixed it for the next release.
But i think you can easily write a workaround as follows:

Code: click into code to enlarge
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
Back to top
View user's profile Send private message Visit poster's website
rodo



Joined: 08 Nov 2006
Posts: 10

PostPosted: Wed Nov 08, 2006 7:49 pm    Post subject:
Thanks for your help!

Now it takes less than 1ms.

Brds
rodo
Back to top
View user's profile Send private message
rodo



Joined: 08 Nov 2006
Posts: 10

PostPosted: Wed Nov 08, 2006 11:35 pm    Post subject:
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
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 05 Jul 2006
Posts: 351

PostPosted: Thu Nov 09, 2006 10:50 pm    Post subject:
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
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Ranorex Forum Index -> Bug Reports All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum