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.
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?
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.