|
carol.gimp.orggimp2Python:add a layer |
|
So easy to do when working directly with TheGIMP, adding a layer in your script is much more complicated. |
| add_layer |
|---|
|
File Edit Search Preferences |
# these lines create an image, create a layer, fill the layer with transparency and add the layer
# to the image.
image = pdb.gimp_image_new(image_width, image_height, RGB)
layer = pdb.gimp_layer_new(image, image_width, image_height, RGB_IMAGE, layer_name, 100, NORMAL_MODE)
pdb.gimp_drawable_fill(layer, BACKGROUND_FILL)
pdb.gimp_image_add_layer(image, layer, 0)
|
|
|
|