LayersCreateFromFile seems to be broken. If i have a layer selected and call ImageEnView1.LayersCreateFromFile('Image1.jpg'); the current selected layer gets replaced by Image1.jpg. If i deselect the current layer by mouse and call the LayersCreateFromFile, nothing happens at all and nothing gets created but the former selected and manually deselected layer gets selected again by imageen.
If no layer exists, nothing happens (no layer gets created and there is no former layer to get selected).
As i understand from the helpfile, it should create a new layer and load the image into it and not tamper with former selected layers.
"Loads an image from a file and adds it as a new image layer."
Simplified (ImageEnView1.LayersCreateFromFile('Image1.jpg');): A Layer exists and is selected before calling the function -> Selected layer gets replaced by the new image A Layer exists and is not selected (nothing is selected) -> nothing happens Nothing exists -> nothing happens.
What should happen (no matter if anything exists or is selected) -> a new lyaer is created and the image is loaded into that new layer.