Tue Feb 25, 2020 3:52 am
img = gimp.Image(width, height)
pdb.gimp_display_new(img)
# load face and tattoo images
face_layer = open_images_as_layer(img, path_to_facial_image)
tattoo_layer= open_images_as_layer(img, path_to_tattoo_image)
# rescale tattoo layer
pdb.gimp_layer_scale(tattoo_layer, new_width, new_height, False)
# set offset of tattoo_layer
pdb.gimp_layer_set_offsets(tattoo_layer, x_offset, y_offset)
# set the tattoo_layer we want to displace to be the same size as the image
pdb.gimp_layer_resize_to_image_size(tattoo_layer)
# load the displacement map
disp_image = pdb.gimp_file_load(disp_file, disp_file)
disp_drawable = pdb.gimp_image_get_active_layer(disp_image)
# this line does not seem to do anything no matter how I set the parameters
pdb.plug_in_displace(img, tattoo_layer, 10, 10, True, True, disp_drawable, disp_drawable, 2)
Tue Feb 25, 2020 4:43 am
pdb.plug_in_displace(img, tattoo_layer, 10, 10, True, True, disp_drawable, disp_drawable, 2, run_mode=RUN_NONINTERACTIVE)
Tue Feb 25, 2020 5:04 am
Tue Feb 25, 2020 7:47 am
MareroQ wrote:Hi i-regular.
You used the wrong number of parameters - lack: run_mode=......
- Code:
pdb.plug_in_displace(img, tattoo_layer, 10, 10, True, True, disp_drawable, disp_drawable, 2, run_mode=RUN_NONINTERACTIVE)
Tue Feb 25, 2020 10:07 am
... the Python doc is built from the Scheme one, but there are mappings between the Python and Scheme