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
 Layer dimensions convert to selections
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

jrpcguru

USA
254 Posts

Posted - Mar 09 2019 :  20:15:21  Show Profile  Reply
ImageEnView1.CopySelectionToIEBitmap

I can't find any help for ImageEnView1.CopySelectionToIEBitmap. The help for ImageEnView.AssignSelTo makes no mention of layers. Yet both of these commands yield an error message that says "Method only supported for image layers".

Is this a bug in the code or in the help file?

I am trying to programmatically make a selection and copy that selection to a second image object and nothing I have tried so far works. This is step one to see if I can do the following:

My goal is to draw several layers around sections of an image that I wish to cut out of the current image. It seems that using layers is visually easiest for a user. Save each layer's dimensions to a .INI file, restore from .INI and use the layers to define the underlying selection for purposes of copying each selection to its own file. I can save and restore the layers location & dimensions, but translating the location and dimensions into a selection and using the resulting selections to save to a file is not working.

I am using 8.3.0.

J.R.

xequte

38182 Posts

Posted - Mar 10 2019 :  00:26:26  Show Profile  Reply
Hi

Rather than CopySelectionToIEBitmap, use CopySelectionToBitmap:

https://www.imageen.com/help/TImageEnView.CopySelectionToBitmap.html

or AssignSelTo.

The error, "Method only supported for image layers," means that the current layer, is not an image layer, it is a shape or other type layer. If it is actually is an image layer, can you give me the steps to reproduce?



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

jrpcguru

USA
254 Posts

Posted - Mar 10 2019 :  17:13:53  Show Profile  Reply
Thanks for the quick reply.
The key point that I was missing is that a selection needs to be on layer 0 which is an image layer by default, I guess. Once I made sure it was on layer 0, then things worked.
ImageenView1.AssignSelTo(ImageEnView2); was clearly the best approach.



J.R.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: