ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Which of these is faster?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

yogiyang

India
727 Posts

Posted - Nov 22 2018 :  08:45:24  Show Profile  Reply
Hello,

I am trying to make selected area of a layer transparent.

I found that there are two methods that we can use.
1. SetSelectedAreaAlpha
2. SetTransparentColors

If anyone has tried this out I wanted to know as to which of these is faster?

I am asking this because from my tests I cannot determine as to which is faster.

TIA


Yogi Yang

wesleybobato

Brazil
367 Posts

Posted - Nov 22 2018 :  09:20:56  Show Profile  Reply
Hi Yang Yogi

You can look at TStopWatch and do a test in Milliseconds and compare the results.

http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.Diagnostics.TStopwatch

Kind regards.
Go to Top of Page

xequte

39052 Posts

Posted - Nov 22 2018 :  20:32:35  Show Profile  Reply
Assuming the selection is already made then SetSelectedAreaAlpha should be faster as it operates on only the area that is selected, whereas SetTransparentColors processes the whole image.

But try using TStopWatch and let us know your results.



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

yogiyang

India
727 Posts

Posted - Nov 23 2018 :  05:47:28  Show Profile  Reply
Hello Nigel,

You are correct! SetSelectedAreaAlpha is faster!

Thanks for the suggestion.




Yogi Yang
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: