RSS/Atom feed Twitter
Site is read-only, email is disabled

Copy layer betwen images

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

3 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

Copy layer betwen images David Hodson 30 Apr 04:19
  Copy layer betwen images saulgoode@flashingtwelve.brickfilms.com 30 Apr 05:45
   Copy layer betwen images David Hodson 30 Apr 06:23
David Hodson
2007-04-30 04:19:12 UTC (about 17 years ago)

Copy layer betwen images

What is the correct way to copy a layer from one image to another, using the API?

-- David Hodson

saulgoode@flashingtwelve.brickfilms.com
2007-04-30 05:45:28 UTC (about 17 years ago)

Copy layer betwen images

Quoting David Hodson :

What is the correct way to copy a layer from one image to another, using the API?

I am not certain of its correctness, but I would use the PDB function 'gimp-layer-new-from-drawable'.

In Script-fu:

(define new-layer (car (gimp-layer-new-from-drawable source-layer destination-image)))

(gimp-image-add-layer destination-image new-layer position)

'position' is the location in the layerstack (0=top; -1 means place the new layer above the active layer). Note that any layermask will also be copied and that the original layermode is retained.

David Hodson
2007-04-30 06:23:08 UTC (about 17 years ago)

Copy layer betwen images

saulgoode@flashingtwelve.brickfilms.com wrote:

Quoting David Hodson :

What is the correct way to copy a layer from one image to another, using the API?

(define new-layer (car (gimp-layer-new-from-drawable source-layer destination-image)))

(gimp-image-add-layer destination-image new-layer position)

Great, that seems to do the trick. Thanks.