Gimp.Image.prototype.remove_layer

function remove_layer(layer: Gimp.Layer): Boolean {
    // Gjs wrapper for gimp_image_remove_layer()
}
  

Remove the specified layer from the image.

This procedure removes the specified layer from the image. If the layer doesn't exist, an error is returned. If there are no layers left in the image, this call will fail. If this layer is the last layer remaining, the image will become empty and have no active layer.

layer

The layer.

Returns

TRUE on success.