Hi Nigel,
Thank you for the information about the REAL ISSUE here: The background image changes its vertical position value when merging with a layer outside the background image's boundaries.
This is a bug. As there seems to be no event handler directly associated with merging the background image, I now use this workaround to correct the vertical position of the background image after the merging:
procedure TForm1.ImageEnView1LayerNotify(Sender: TObject; layer: Integer; event: TIELayerEvent);
begin
if event = ielAction then
ImageEnView1.Layers[0].PosY := 0;
end;
This workaround fixes the fundamental issue, and now the bottom layer is added at the correct position:
Is there a better way to automatically correct the vertical position of the background image after the merging?