Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import gimpcolor
- # load mask as layer
- mask=pdb.gimp_file_load_layer(image,'/path/to/mask.png')
- pdb.gimp_image_add_layer(image, mask,0)
- # get selection
- pdb.gimp_image_select_color(image, CHANNEL_OP_REPLACE, mask,gimpcolor.RGB(0,0,0))
- # drop the mask layer
- pdb.gimp_image_remove_layer(image,mask)
Add Comment
Please, Sign In to add comment