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
 Contrast Issues
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Sybaritica

Canada
4 Posts

Posted - Jun 01 2021 :  07:08:33  Show Profile  Reply
Hi ... I am having difficulty adjusting Contrast in ImageEnView Images. I have been trying to use Proc.Contrast, Proc.Contrast2, and Proc.Contrast3, as well as Proc.AdjustBrightnessContrastSaturation, all with the same result.

I have tried using Buttons, Trackbars and ScrollBars as Controls, but I will illustrate my issue with Code using Buttons.

procedure TFormMain.Button1Click(Sender: TObject);
begin
ImageEnView1.Proc.Contrast (2);
end;

procedure TFormMain.Button1Click(Sender: TObject);
begin
ImageEnView2.Proc.Contrast (-2);
end;

Basically, the idea is to use Button1 to increase contrast in increments. This works, but the problem is that corresponding clicks of Button2 (de-incrementing), do not produce a corresponding change. That is to say, if I increase by, say, 4 clicks, and then decrease by 4 clicks, the image does not look as it did before making any changes. The difference in the original image increases with the number of increases/decreases, and gets even less like the original the more times I repeat the operation.

I feel I must be missing something, here. Can anyone explain?



xequte

6138 Posts

Posted - Jun 01 2021 :  20:30:39  Show Profile  Reply
Hi

I think you are better to change the display contrast of the bitmap instead:

https://www.imageen.com/help/TIEBitmap.Contrast.html

You can "Apply" it when adjustment is complete.

See the demo:

Demos\Display\DisplayAdjust\Display.dpr
http://www.imageen.com/files/demos/run/Display/DisplayAdjust/Display.exe

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

Sybaritica

Canada
4 Posts

Posted - Jun 02 2021 :  15:29:19  Show Profile  Reply
Excellent!

Thanks very much, Nigel. That was helpful.

John Thompson
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To: