Gimp.Layer.new_from_visible
function new_from_visible(image: Gimp.Image, dest_image: Gimp.Image, name: String): Gimp.Layer {
// Gjs wrapper for gimp_layer_new_from_visible()
}
Create a new layer from what is visible in an image.
This procedure creates a new layer from what is visible in the given image. The new layer still needs to be added to the destination image, as this is not automatic. Add the new layer with the Gimp.Image.prototype.insert_layer command. Other attributes such as layer mask modes, and offsets should be set with explicit procedure calls.
Since 2.6
- image
The source image from where the content is copied.
- dest_image
The destination image to which to add the layer.
- name
The layer name.
- Returns
The newly created layer.