Hello Nigel,
Here is the code that I am using:
//declare in public
ieSpEffect: TImageEnView;
//Before calling the Dialog code is in MainForm
ieSpEffect := TImageEnView.Create(Self);
ieSpEffect.CurrentLayer.Bitmap.Assign(ieViewMain.CurrentLayer.Bitmap);
if ieSpEffect.CurrentLayer.Bitmap.Width > 800 then
ieSpEffect.Proc.Resample(800, -1, rfLanczos3);
ieSpEffect.Update;
//Create Instance of Dialog and Show
frmContrest2Dlg := TfrmContrest2Dlg.Create(Self);
frmContrest2Dlg.ShowModal
//In Dialog on various controls change event code
MainForm.ieSpEffect.Proc.Intensity(0, 255,Round(tbBrightness.Value / 2), False, True, True, True); //<== getting error here
What method do you use to create ieSpEffect
I am using the code:
ieSpEffect := TImageEnView.Create(Self);
At the time of the Intensity() call, are ieSpEffect or ieSpEffect.Proc NIL?
I have never checked if the variables are nil in code. This code was working perfectly for all these years without any problems whatsoever.
TIA
Yogi Yang