GimpTalk Announcement :
Try your digital-art skills against your fellow gimpers in GIMPtalk's Biweekly Art competition !


Board index Web Development Services . Convert FLV to Cell Phone Format
Featured Tutorial : Learn how to create characters by Griatch
Search for :  
  Posted by bertram79 On July 18, 2010 | Total views : 173 | Total Replies : 4

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!


Welcome to GimpTalk !

GimpTalk is a premier community of Gimp users. This community has very talented desginers, graphics artists and photographers, producing high quality graphics and helping the new users of gimp. We request and encourage all the users to particpate in the forums and post quality work in the form of tutorials, articles or artwork in Art Galleries.

GT Sponsors : XiTalk Forum . API Talk . Free Flv Player

Acai Berry Diet
. Free Ringtones

    

Recently posted Official Tutorials

  • A Realistic gear in GIMP
  • ZeroMission Tag Tutorial
  • 3D Text using Environment Mapping
  • Cross-eye Stereoimages in GIMP
  • Make Opals with Plasma
  • Spectral Image
  • Mother of pearl with silver jewelry tut, also t..
  • Animated Painting - Using Animated Path Strokin..
  • a cool PS tutorial (does NOT need to be transla..
  • Animated Route Along a Map
  • Simple Animated Shapes - Using Animated Path St..
  • Graphics - Survival Guide
  • Animated Highlights Using "Move Layer"..
  • Spinning Pole Animation
  • 3D Penetration Text


    Recently contributed tutorials by users

  • Ryou Fugibayashi Tag Tutorial
  • MY First TuT !
  • Making A Userbar
  • Different types of shading, Part 1, Cell:
  • Semi coloring tutorial, manga eye's:
  • How To Draw Four Different Manga/Anime Eyes (vi..
  • Halo tag tutorial
  • Skinning GIMP Manually on Windows
  • Halo. That's right. A Halo tut.
  • Ikariam Logo Tutorial
  • Tip: Map Object (sphere)
  • Yet another anime sig tut =3 (by me, this time,..
  • Darth Vader Tag/Signature Tutorial
  • Solid Snake Tutorial
  • A Quick GMIC trick


    Recently added Gimp plugins, filters and scripts

  • Natural Brushes
  • Color harmonies in Gimp
  • Mathmap 1.3.5
  • Color Percentage
  • nearest neighbor interpolation in a script
  • Controlling GIMP from another program
  • [SOLVED] Gimp batch for resizing a bunch of ima..
  • Math Behind Unsharp Mask and Contrast
  • unsharp mask: is it possible to save last value..
  • RAR files
  • Related Website
    Gimp tutorials database
    All rights reserved © GimpTalk 2008
    forum software by
    phpBB