![]() |
|||
|
|||
|
| Board index | Web
Development Services
. Convert FLV
to Cell Phone Format Featured Tutorial : Learn how to create characters by Griatch |
|
||
|
||
Hi,
complete beginner with script-fu, but I have not been able to find a specific solution to my problem in the forums. I run a script which applies the map-object filter to an image. It works fine up until the point when I want to save the image. The problem is that map-object opens a new file for the output. So my questions is: how do either prevent this plug-in from opening a new image, or how do I save the new image with my script? My code looks like this: Code: (define (pbe-wireframe size res) (let* ( (my_image (car (gimp-image-new size size RGB))) (my_layer (car (gimp-layer-new my_image size size RGB-IMAGE "Wireframe" 0 NORMAL))) ) (gimp-image-add-layer my_image my_layer 0) (gimp-context-set-background '(255 255 255)) (gimp-drawable-fill my_layer BACKGROUND-FILL) (plug-in-checkerboard RUN-NONINTERACTIVE my_image my_layer 0 res) (plug-in-edge RUN-NONINTERACTIVE my_image my_layer 2 1 0) (plug-in-map-object RUN-NONINTERACTIVE my_image my_layer 1 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 2 '(255 127 0) 1 1 1 0 0 0 0 0 0 0 0 FALSE FALSE FALSE TRUE 1 10 10 10 0 -1 -1 -1 -1 -1 -1 -1 -1) (gimp-file-save RUN-NONINTERACTIVE my_image my_layer "C:\\Users\\pbe\\Pictures\\sphere\\sfu\\tst.jpg" "C:\\Users\\pbe\\Pictures\\sphere\\sfu\\tst.jpg") ) ) (script-fu-register "pbe-wireframe" "Wireframe" "Creates a Wireframe" "P.B." "P.B." "2010-07-18" "" SF-VALUE "size" "100" SF-VALUE "res" "5" SF-COLOR "color" '(000 000 000)) (script-fu-menu-register "pbe-wireframe" "<Toolbox>/Xtns/AAA_scripts") The result is that it saves only the image as it is before the map-object line, and the generated sphere is shown in the graphical output. All help greatly appreciated! |
Recently posted Official Tutorials Recently contributed tutorials by users Recently added Gimp plugins, filters and scripts |
|