I have noticed the following odd behavior with ImageEn for Delphi, version 7.2.6:
Load an image into ImageEnView1 with LoadFromFile which is bigger than 2 x 2 ImageEnView1.IsEmpty returns False Call ImageEnView1.LayersAdd() ImageEnView1.IsEmpty now returns True.
The image is clearly not empty nor too small. I believe the problem is that IsEmpty relies on fIEBitmapValid, and that flag is being re-set to False in SetLayersCurrentEx because the new layer (a shape) is not a valid bitmap. I have attached a small sample project which was made in Delphi XE7, but the bug is still manifest in Sydney.
Thank you for your response. Since the tool in question should only be active when an image is actually loaded, I set a private boolean to the result of LoadFromFile, and then check that boolean in the OnUpdate method of the action. After all, I didn't want an OnUpdate method to change the active layer, and there is always a layer 0 so I couldn't check against that. Thanks, Nigel.