>>>>> "Simon" == Simon Budig <[EMAIL PROTECTED]> writes:

    Simon> Roland Roberts ([EMAIL PROTECTED]) wrote:
    >> I'm trying to copy a layer from one image to another.  Below is a
    >> fragment of the code to do this; new-image has already been created
    >> with the same base type as the old-image.
    Simon> [...]
    >> (gimp-selection-all old-image)
    >> (gimp-edit-copy old-layer)

    Simon> It *might* (just tested with the GUI) be a better idea to
    Simon> use (gimp-selection-none old-image),  [...]

Thanks for this suggestion.  It turns out that using
gimp-selection-none on both the old and new images gets things pasted
into the right locations.

    Simon> Also you might want to use gimp-floating-sel-to-layer and
    Simon> use (gimp-layer-set-offsets ..) on this newly created
    Simon> layer. [...]

Naively using this results in twice as many layers as what I started
with.  And gimp-floating-sel-to-layer is documented to return nothing,
so I'm not sure how I am supposed to find the newly created layer.
Maybe I should have used gimp-selection-float to create the layer?

In any event, just removing the selection from both images results in
an exact copy.

    Simon> However, it is an annoyance that gimp-layer-copy restricts
    Simon> the usage of the result to the originating image. [...]

I agree...I first thought that was exactly what I wanted until I read
the comments to realize I could only copy within an image.

                       PGP Key ID: 66 BC 3B CD
Roland B. Roberts, PhD                             RL Enterprises
[EMAIL PROTECTED]                     76-15 113th Street, Apt 3B
[EMAIL PROTECTED]                       Forest Hills, NY 11375
Gimp-developer mailing list

Reply via email to