gimp-layer-new

Spencer Kimball & Peter Mattis

Description

Create a new layer.

Help

This procedure creates a new layer with the specified width, height, and type. Name, opacity, and mode are also supplied parameters. The new layer still needs to be added to the image, as this is not automatic. Add the new layer with the 'gimp-image-insert-layer' command. Other attributes such as layer mask modes, and offsets should be set with explicit procedure calls.


Type

unknown

Parameters

Type Name Description
PF_IMAGE image The image to which to add the layer
PF_INT width The layer width (1 <= width <= 524288)
PF_INT height The layer height (1 <= height <= 524288)
PF_INT type The layer type { RGB-IMAGE (0), RGBA-IMAGE (1), GRAY-IMAGE (2), GRAYA-IMAGE (3), INDEXED-IMAGE (4), INDEXEDA-IMAGE (5) }
PF_VALUE name The layer name
PF_FLOAT opacity The layer opacity (0 <= opacity <= 100)
PF_INT mode The layer combination mode { NORMAL-MODE (0), DISSOLVE-MODE (1), BEHIND-MODE (2), MULTIPLY-MODE (3), SCREEN-MODE (4), OVERLAY-MODE (5), DIFFERENCE-MODE (6), ADDITION-MODE (7), SUBTRACT-MODE (8), DARKEN-ONLY-MODE (9), LIGHTEN-ONLY-MODE (10), HUE-MODE (11), SATURATION-MODE (12), COLOR-MODE (13), VALUE-MODE (14), DIVIDE-MODE (15), DODGE-MODE (16), BURN-MODE (17), HARDLIGHT-MODE (18), SOFTLIGHT-MODE (19), GRAIN-EXTRACT-MODE (20), GRAIN-MERGE-MODE (21), COLOR-ERASE-MODE (22), NEW-OVERLAY-MODE (23), LCH-HUE-MODE (24), LCH-CHROMA-MODE (25), LCH-COLOR-MODE (26), LCH-LIGHTNESS-MODE (27), ERASE-MODE (1000), REPLACE-MODE (1001), ANTI-ERASE-MODE (1002) }

Return

Type Name Description
PF_LAYER layer The newly created layer