When you perform a 'gimp-image-merge-visible-layers', a new layer is
created and its ID returned by the function. You need to pass that new
layer's ID to 'gimp-png-save' ("ombre1" no longer exists).
> I got my script-fu script working, and producing the image I need. Here
> it is :
> However, I can't save the image when it's merged. It works if I don't
> merge the layers, but as soon as they're merged, there's an error.
Gimp-user mailing list