Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
pierrotsc
Posted - May 10 2019 : 09:54:32 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
6 L A T E S T R E P L I E S (Newest First)
pierrotsc
Posted - Jun 26 2019 : 08:26:04 Thanks Nigel, i get it.
xequte
Posted - Jun 25 2019 : 23:25:33 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.
Posted - Jun 25 2019 : 17:09:21 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.
xequte
Posted - Jun 25 2019 : 16:49:00 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;
Posted - Jun 22 2019 : 16:29:23 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();