Constructor
GimpLayernew_from_pixbuf
Declaration [src]
GimpLayer*
gimp_layer_new_from_pixbuf (
GimpImage* image,
const gchar* name,
GdkPixbuf* pixbuf,
gdouble opacity,
GimpLayerMode mode,
gdouble progress_start,
gdouble progress_end
)
Description [src]
Create a new layer from a %GdkPixbuf.
This procedure creates a new layer from the given %GdkPixbuf. The
image has to be an RGB image and just like with gimp_layer_new()
you will still need to add the layer to it.
If you pass progress_end
> progress_start
to this function,
gimp_progress_update()
will be called for. You have to call
gimp_progress_init()
beforehand then.
Available since: | 2.2 |
Parameters
image |
GimpImage |
The RGB image to which to add the layer. |
|
The data is owned by the caller of the function. | |
name |
const gchar* |
The layer name. |
|
The data is owned by the caller of the function. | |
The value is a NUL terminated UTF-8 string. | |
pixbuf |
GdkPixbuf |
A GdkPixbuf. |
|
The data is owned by the caller of the function. | |
opacity |
gdouble |
The layer opacity. |
|
mode |
GimpLayerMode |
The layer combination mode. |
|
progress_start |
gdouble |
Start of progress. |
|
progress_end |
gdouble |
End of progress. |
Return value
Returns: | GimpLayer |
The newly created layer. The object belongs to libgimp and you should not free it. |
|
The data is owned by the called function. |