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
 Curve question
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

pierrotsc

USA
497 Posts

Posted - Nov 26 2018 :  16:24:05  Show Profile  Reply
I modified the color curve demo to be able to add layers.
If i load an image and change the curve, the image gets darker or lighter. now if i add a layer and assign the imageenview, when i move the point on the curve, only the selected layer (new one) gets modified. the background stayed the same as it was before i loaded a new layer.
I thought that all the layers should be modified but i guess not.
Is that the normal behavior ?
Thanks
Pierre

xequte

38611 Posts

Posted - Nov 26 2018 :  22:44:29  Show Profile  Reply
Hi Pierre

Yes, because ImageEn treats each layer as a separate image for the purposes of editing. You would need to use the ApplyCurve() method to assign the changes to each layer.



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

pierrotsc

USA
497 Posts

Posted - Nov 27 2018 :  08:42:39  Show Profile  Reply
Thank you. so let me ask you another question. I have not tried yet. If i modify the curve in layer 0, add another layer and then modify this layer too. it looks like layer 0 still show the original modification. now if i select back layer 0, i assume the curve does not go back to its original setting, the one I had before i created the new layer ?
Go to Top of Page

xequte

38611 Posts

Posted - Nov 27 2018 :  22:33:58  Show Profile  Reply
Hi

The layer should be same as when you last modified it. Is that what you mean?



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

pierrotsc

USA
497 Posts

Posted - Nov 28 2018 :  08:44:18  Show Profile  Reply
yes, that is what i mean but the curve will not revert to the state that created the modification when you switch back to the original layer. No worry, let me play with that.
Go to Top of Page

w2m

USA
1990 Posts

Posted - Nov 28 2018 :  11:10:38  Show Profile  Reply
Try this:

procedure TFormCurves.ImageEnView1LayerNotify(Sender: TObject; layer: Integer;
  event: TIELayerEvent);
begin
  if event = ielSelected then
  begin
    ImageEnView1.LayersCurrent := layer;
    IEColorCurve1.AssignSource(ImageEnView1.IEBitmap);
    IEColorCurve1.ResetAllCurves();
  end;
end;


Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

pierrotsc

USA
497 Posts

Posted - Nov 28 2018 :  11:12:04  Show Profile  Reply
will do..working on it. thanks
Go to Top of Page

w2m

USA
1990 Posts

Posted - Nov 28 2018 :  11:17:02  Show Profile  Reply
Actually to apply the existing curve to a layer try this:

procedure TFormCurves.ImageEnView1LayerNotify(Sender: TObject; layer: Integer;
  event: TIELayerEvent);
begin
  if event = ielSelected then
  begin
    ImageEnView1.LayersCurrent := layer;
    IEColorCurve1.AssignSource(ImageEnView1.IEBitmap);
  end;
end;

This will apply the curve to any selected layer.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

pierrotsc

USA
497 Posts

Posted - Nov 28 2018 :  11:25:58  Show Profile  Reply
ok..There is no Onaddpoint event :)
Go to Top of Page

xequte

38611 Posts

Posted - Nov 28 2018 :  15:09:48  Show Profile  Reply
Hi

We'll do some work to improve the color curve handling with layers for the next release.

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

pierrotsc

USA
497 Posts

Posted - Nov 28 2018 :  15:11:59  Show Profile  Reply
Thanks..I did not see anything about that in the latest. No hurry..Thanks
Go to Top of Page

xequte

38611 Posts

Posted - Jan 27 2019 :  23:18:00  Show Profile  Reply
Hi

I investigated this today. TIEColorCurve is only using the TImageEnView for previewing, so it is correct for it to output to the active layer. You should use the LayerChange event of the TImageEnView to ensure the color curve is relevant to the selected layer.

I will improve the documentation.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: