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

pierrotsc

USA
373 Posts

Posted - May 10 2019 :  09:54:32  Show Profile  Reply
I am trying to create a checkbox that allows to enable/disable the preview of the iecolorcurve but it is not working.
if sCheckBox_PreviewCurve.Checked then
IEColorCurve.PreviewImageEnView := imageenview
else
IEColorCurve.PreviewImageEnView := nil;
ImageenView.Update();

Any advice on making it work ?

Thanks
Pierre

xequte

4649 Posts

Posted - May 12 2019 :  18:18:04  Show Profile  Reply
Hi Pierre

Email me for an update that supports Clear();

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

pierrotsc

USA
373 Posts

Posted - Jun 22 2019 :  16:29:23  Show Profile  Reply
Nigel,thanks for adding clear but not sure if that works, regardless of what i press, the curve is always applied. here's my code:

  if Action_PreviewCurve.checked then
    IEColorCurve.PreviewImageEnView := imageenview
  else
  begin
    IEColorCurve.Clear();
    IEColorCurve.PreviewImageEnView := nil;
  end;
  imageenview.Update();


Best
Go to Top of Page

xequte

4649 Posts

Posted - Jun 25 2019 :  16:49:00  Show Profile  Reply
Hi Pierre

Are you wanting to fully reset the content of color curve?

How about:

// Checkbox code to enable or disable the Color Curve
procedure TfrmCurves.chkEnableColorCurveClick(Sender: TObject);
begin
  if chkEnableColorCurve.Checked then
  begin
    IEColorCurve1.AssignSource(imgPreview.IEBitmap);
    IEColorCurve1.Enabled := True;
  end
  else
  begin
    IEColorCurve1.Clear();
    IEColorCurve1.ResetAllCurves();
    IEColorCurve1.Enabled := False;
  end;
end;


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

pierrotsc

USA
373 Posts

Posted - Jun 25 2019 :  17:09:21  Show Profile  Reply
Nigel, i do not want to reset the curve, i just want to toggle the effect of the curve on the image. Also, if you have the preview on and for example, you invert the image and after that resample it, the inversion disappear. if you have the preview off, everything works.
i am using IEColorCurve.PreviewImageEnView.
Maybe i am not doing it right.
Go to Top of Page

xequte

4649 Posts

Posted - Jun 25 2019 :  23:25:33  Show Profile  Reply
Hi Pierre

I think you are attempting to use it in a way it is not quite intended.

PreviewImageEnView specifies the TImageEnView that is used to show a preview of the color curve effect. TIEColorCurve assumes it has exclusive rights to the TImageEnView, so will clear any existing content.

To lock in the effect you need to call ApplyCurve.

To revert an image that Color Curve has used for preview, assign the original image back to it.

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

pierrotsc

USA
373 Posts

Posted - Jun 26 2019 :  08:26:04  Show Profile  Reply
Thanks Nigel, i get it.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To: