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
 Avatar selection
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

mountaincoder

USA
12 Posts

Posted - Jun 02 2023 :  17:43:20  Show Profile  Reply
I will struggle through and figure this out myself if needed, but I thought there may be an easy answer I'm not seeing.

In my program (VCL) users can upload images which we then use a circle from as the avatar or profile image (like LinkedIn or Facebook - nothing new here).

Currently we're just grabbing the circle from the center of the image but our users would like to select the area of the image that is used (because they are used to all the social apps).

Is there an easy way to do this using ImageEn VCL (latest version)?

xequte

38615 Posts

Posted - Jun 03 2023 :  04:11:47  Show Profile  Reply
Hi

Why not just use a circular selection? You could default to your best guess by setting the initial circle rect too.

ImageEnView1.MouseInteractGeneral := [miSelectCircle];

http://www.imageen.com/help/TImageEnView.MouseInteractGeneral.html

You can force a circle (rather than an ellipse) using:

ImageEnView1.ShiftKeyLock := [ iessAlt_MaintainAR ];

http://www.imageen.com/help/TImageEnView.ShiftKeyLock.html


And you can initialize the selection using:

http://www.imageen.com/help/TImageEnView.SelectEllipse.html


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

xequte

38615 Posts

Posted - Jun 03 2023 :  04:26:45  Show Profile  Reply
You can also gray out the non-selection using iesoMarkOuter:

http://www.imageen.com/help/TImageEnView.SelectionOptions.html

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

mountaincoder

USA
12 Posts

Posted - Jun 03 2023 :  14:38:16  Show Profile  Reply
Thanks Nigel! That's just what I needed to get started.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: