A script creates an image, a background layer, imports an image in a new layer,
then runs the plug-in-cartoon.
All works well, but the last step has no effect.
If I enter the same command on the script-fu console then the plug-in works
well (the script prints the image and layer id so that it is easy to enter the
This is the script (I removed a lot of math and useless stuff, if you want to
try it you only need to change the image pathname):
(image (car (gimp-image-new 800 600 RGB)))
(background-layer (car (gimp-layer-new image 800 600 RGB-IMAGE
"Background" 100 NORMAL-MODE)))
(background-photo (car (gimp-file-load-layer RUN-NONINTERACTIVE image
(gimp-message (string-append (number->string image) "\n" (number->string
(gimp-drawable-fill background-layer BG-IMAGE-FILL)
(gimp-image-add-layer image background-layer -1)
(gimp-image-add-layer image background-photo -1)
(gimp-layer-set-opacity background-photo 20)
(gimp-layer-scale background-photo 800 600 FALSE)
(gimp-layer-set-offsets background-photo 10 20)
(plug-in-cartoon 1 image background-layer 7 0.2)
Please let me know if there is a better forum to address this type of questions.
Gimp-user mailing list