Constructor
GimpLayernew_from_pixbuf
since: 2.2
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-
Type:
GimpImageThe RGB image to which to add the layer.
The data is owned by the caller of the function. name-
Type:
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-
Type:
GdkPixbufA GdkPixbuf.
The data is owned by the caller of the function. opacity-
Type:
gdoubleThe layer opacity.
mode-
Type:
GimpLayerModeThe layer combination mode.
progress_start-
Type:
gdoubleStart of progress.
progress_end-
Type:
gdoubleEnd of progress.
Return value
Type: GimpLayer
The newly created layer. The object belongs to libgimp and you should not free it.
| The data is owned by the called function. |