carol.gimp.org

gimp2

Python:add a layer

python

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)









  

another-gnu-type

Most all of my software is gnu. thanks!

Valid XHTML 1.1!

CC-GNU GPL
This software is licensed under the CC-GNU GPL.