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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Which of these is faster?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
yogiyang Posted - Nov 22 2018 : 08:45:24
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
3   L A T E S T    R E P L I E S    (Newest First)
yogiyang Posted - Nov 23 2018 : 05:47:28
Hello Nigel,

You are correct! SetSelectedAreaAlpha is faster!

Thanks for the suggestion.




Yogi Yang
xequte Posted - Nov 22 2018 : 20:32:35
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
wesleybobato Posted - Nov 22 2018 : 09:20:56
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.