RSS/Atom feed Twitter
Site is read-only, email is disabled

Problem using a plug-in in script-fu

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

Problem using a plug-in in script-fu stenci 16 Dec 06:43
  Problem using a plug-in in script-fu Sven Neumann 17 Dec 00:15
2008-12-16 06:43:17 UTC (about 16 years ago)
postings
1

Problem using a plug-in in script-fu

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 manual command).

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):

(let* (
(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 "C:/Foto/2008-03 Italy/Bologna/img_0472.jpg"))) )
(gimp-message (string-append (number->string image) "\n" (number->string background-photo))) (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) (gimp-display-new image)
)

Please let me know if there is a better forum to address this type of questions.

Sven Neumann
2008-12-17 00:15:35 UTC (about 16 years ago)

Problem using a plug-in in script-fu

Hi,

On Tue, 2008-12-16 at 06:43 +0100, Stefano wrote:

(let*
(
(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 "C:/Foto/2008-03 Italy/Bologna/img_0472.jpg"))) )
(gimp-message (string-append (number->string image) "\n" (number->string background-photo))) (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) (gimp-display-new image)

You are running plug-in-cartoon on the drawable 'background-layer'. You probably want to run it on 'background-photo' instead.

Sven