[Gimp-developer] Script-Fu error ... GUI shows different image selection than what script gets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a script-fu set up which has the following initialization:

(script-fu-register "script-fu-astro-rescale-for-web"
		    "<Toolbox>/Xtns/Script-Fu/Astronomy/Scale for Web"
		    "Rescale current image to \"standard\" sizes for web display"
		    "Roland B. Roberts <roland@xxxxxxxxxxxxx>"
		    "Roland B. Roberts <roland@xxxxxxxxxxxxx>"
		    "4 September 2002"
		    ""
		    SF-IMAGE "Image" 0
		    SF-VALUE "Size List" "'(1600 1280 1024 800 640 320 160)")

When the script is run by selecting it from the menu, an option list
is presented which shows the current (and only, in this case) as
selected.  If I simply hit "Okay", I get the following error:

    Script-Fu Error while executing (script-fu-astro-rescale-for-web 0 '(320))
    ERROR: Procedural database executinog failed: (gimp_image_width 0)

The problem is that my image is *not* image 0.  It is image 5.  I
realize I have 0 as a default and most of the time that will probably
make sense.  But why is it showing me image 5 in the option list and
then not using it.  If I click on the option list and "select" the
only image showing, it works correctly.

Also, I tried evaluating (gimp-image-list) in the Script-Fu console
and there really is only one image; i.e., I don't have any invisible
ones hanging around.

roland
-- 
		       PGP Key ID: 66 BC 3B CD
Roland B. Roberts, PhD                             RL Enterprises
roland@xxxxxxxxxxx                     76-15 113th Street, Apt 3B
roland@xxxxxxxxxxxxx                       Forest Hills, NY 11375


[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux