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
 Apply Brightness/Saturation to a Selection only
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

AndyColmes

USA
351 Posts

Posted - Jan 04 2012 :  07:50:25  Show Profile  Reply
I would like to apply or change Brightness/Saturation in an image but only specified in a Selection. How can I achieve this?

Thanks.

fab

1310 Posts

Posted - Jan 04 2012 :  09:48:34  Show Profile  Reply
Let the user to select a region (in this case a rectangle, but other shapes are available), with:

ImageEnView1.MouseInteract := [miSelect];

Then change brightness/saturation, for example (other ways are available), with:

ImageEnView1.Proc.AdjustBrightnessContrastSaturation(....);

You can also select a region in-code. Example:

ImageEnView1.Select(x1, y1, x2, y2);
ImageEnView1.Proc.AdjustBrightnessContrastSaturation(...);

About Select usage look also TImageEnView.SelectionBase.
Go to Top of Page

AndyColmes

USA
351 Posts

Posted - Jan 06 2012 :  07:39:10  Show Profile  Reply
Thanks Fabrizio. It looks like adjustments are confined to a selection if there is one, if not it affects the whole image.

What the recommended limits (min/max) for the Brightness and Contrast values?
Go to Top of Page

w2m

USA
1990 Posts

Posted - Jan 06 2012 :  14:37:32  Show Profile  Reply
Brightness can assume values from -100 to 512.
Contrast can assume values from -100 to 100.
Saturation can assume values from 0 to 512.

William Miller
Go to Top of Page

AndyColmes

USA
351 Posts

Posted - Jan 07 2012 :  01:14:20  Show Profile  Reply
Thank you William.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: