[Gimp-user] Installing additional scripts

2002-05-31 Thread Juliet Jennifer Mari R

Hallo gimpies,

Has anybody an idea how to install new additional scripts in Gimp? Suppose you have a 
written Script- Fu- script stored as a textfile of course, and want the script to be 
executeable via the submenu of the popup window or through the Script- Fu database 
console window as a command, one of the two option shall be sufficient enough to get 
explained. I have already tried to store the scripts in the appropriate /scripts 
directory of the gimp installation of course, but that  did not imply any automatic 
loading procedure... which I had exspected. Is there a mechanism of automatically 
loading scripts into menus available or is there any special type of script 
configuration file additionally, where all actual scripts are listed and where you can 
configure at least the file manually...?  And: the file suffix of the script might be 
of help too, as .txt might not be the proper format. Thanx.

:( Juliet

On Thu, 30 May 2002, [EMAIL PROTECTED] wrote:

 Sender: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Delivered-To: [EMAIL PROTECTED]
 Received: (cpmta 6749 invoked from network); 30 May 2002 12:01:04 -0700
 Received: from 128.32.247.242 (HELO lists.XCF.Berkeley.EDU)
   by smtp.c012.snv.cp.net (209.228.35.208) with SMTP; 30 May 2002 12:01:04 -0700
 Received: from lists.XCF.Berkeley.EDU (lists.XCF.Berkeley.EDU [127.0.0.1])
 by lists.XCF.Berkeley.EDU (Postfix) with ESMTP
 id 4828F1F0D7; Thu, 30 May 2002 12:01:06 -0700 (PDT)
 Content-Length: 3789
 Content-Type: text/plain
 List-Archive: http://lists.xcf.berkeley.edu/lists/gimp-user/
 List-Subscribe: http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user,
 mailto:[EMAIL PROTECTED]?subject=subscribe
 X-Received: 30 May 2002 19:01:04 GMT
 Errors-To: [EMAIL PROTECTED]
 Precedence: bulk
 List-Unsubscribe: http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user,
 mailto:[EMAIL PROTECTED]?subject=unsubscribe
 List-Post: mailto:[EMAIL PROTECTED]
 Subject: Gimp-user digest, Vol 1 #369 - 3 msgs
 List-Help: mailto:[EMAIL PROTECTED]?subject=help
 From: [EMAIL PROTECTED]
 List-Id: gimp-user.lists.xcf.berkeley.edu
 X-Mailman-Version: 2.0.8
 X-Beenthere: [EMAIL PROTECTED]
 Return-Path: [EMAIL PROTECTED]
 Mime-Version: 1.0
 Reply-To: [EMAIL PROTECTED]
 Date: Thu, 30 May 2002 12:01:06 -0700 (PDT)
 X-Mailer: Mailman v2.0.8
 Message-Id: [EMAIL PROTECTED]
 
 Send Gimp-user mailing list submissions to
 [EMAIL PROTECTED]
 
 To subscribe or unsubscribe via the World Wide Web, visit
 http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
 or, via email, send a message with subject or body 'help' to
 [EMAIL PROTECTED]
 
 You can reach the person managing the list at
 [EMAIL PROTECTED]
 
 When replying, please edit your Subject line so it is more specific
 than Re: Contents of Gimp-user digest...
 
 
 Today's Topics:
 
1. Losing precision (John Culleton)
2. Re: Losing precision (Roland Roberts)
3. Re: Losing precision (Jon Winters)
 
 --__--__--
 
 Message: 1
 From: John Culleton [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Date: Thu, 30 May 2002 12:02:18 -0400
 Subject: [Gimp-user] Losing precision
 
 I have a JPEG that was scanned at say 300dpi. I reduce it in size in Gimp=
 =2E Now=20
 the dpi shoots up in proportion. I want to use the reduced image on a web=
 =20
 page where anything over 75dpi is overkill. I know I can scale back the=20
 precision when I save the file but what is the relationship if any betwee=
 n=20
 the percentages shown on the save dialogue and the dpi of the saved image=
 ?=20
 --=20
 John Culleton
 Able Indexers and Typesetters=20
 http://wexfordpress.com
 
 
 
 __
 D O T E A S Y - Join the web hosting revolution!
  http://www.doteasy.com
 
 --__--__--
 
 Message: 2
 To: [EMAIL PROTECTED]
 Subject: Re: [Gimp-user] Losing precision
 From: Roland Roberts [EMAIL PROTECTED]
 Date: 30 May 2002 13:30:24 -0400
 
  John == John Culleton [EMAIL PROTECTED] writes:
 
 John I have a JPEG that was scanned at say 300dpi. I reduce it in
 John size in Gimp. Now the dpi shoots up in proportion. I want to
 John use the reduced image on a web page where anything over
 John 75dpi is overkill. I know I can scale back the precision
 John when I save the file but what is the relationship if any
 John between the percentages shown on the save dialogue and the
 John dpi of the saved image?
 
 If you are putting it on the web, ignore DPI.  You don't care about
 DPI, you care about dimensions.  DPI will have *no* effect on what you
 see for a web image.
 
 roland
 -- 
PGP Key ID: 66 BC 3B CD
 Roland B. Roberts, PhD RL Enterprises
 [EMAIL PROTECTED] 76-15 113th Street, Apt 3B
 [EMAIL PROTECTED]   Forest Hills, NY 11375
 
 --__--__--
 
 Message: 3
 Date: Thu, 30 May 2002 12:36:01 -0500 (CDT)
 From: Jon Winters [EMAIL PROTECTED]
 To: Roland Roberts [EMAIL PROTECTED]
 Cc: 

Re: [Gimp-user] Installing additional scripts

2002-05-31 Thread Joel

 Has anybody an idea how to install new additional scripts in Gimp? Suppose
 you have a written Script- Fu- script stored as a textfile of course, and
 want the script to be executeable via the submenu of the popup window or
 through the Script- Fu database console window as a command, one of the two
 option shall be sufficient enough to get explained. I have already tried to
 store the scripts in the appropriate /scripts directory of the gimp
 installation of course, but that  did not imply any automatic loading
 procedure... which I had exspected. Is there a mechanism of automatically
 loading scripts into menus available or is there any special type of script
 configuration file additionally, where all actual scripts are listed and
 where you can configure at least the file manually...?  And: the file
 suffix of the script might be of help too, as .txt might not be the proper
 format. Thanx.

Gimp automatically loads any script it finds when it starts. There isn't any 
special configuration necessary, but they do need to be correctly formatted, 
named, and in the correct directory.

Scheme scripts should have a .scm extension, in /usr/share/gimp/ver/scripts 
or $HOME/.gimp/scripts.

Perl and Python scripts don't need an extension (under Linux, anyway...), but 
they should be set to executable, and be put in /usr/lib/gimp/ver/plug-ins/ 
or $HOME/.gimp/plug-ins.

In either case, Gimp will try to validate each script when it opens it. If 
there is a critical error in the script itself, it will usually show this 
message when run from a command line:
LibGimp-WARNING **: gimp: wire_read: unexpected EOF


You can call the script from any part of the menu you want, just specify where 
it should be put in the register function. Here is an example (in Scheme):

; Register the function with the GIMP:

(script-fu-register
script-fu-my-script
_Image/Script-Fu/MyScript   -- location in menu structure
What does this script do?
Author
copyright...
date...

SF-IMAGE Image 0 variables to pass to the script
SF-DRAWABLE Drawable 0
)


--Joel

___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user



Re: [Gimp-user] Installing additional scripts

2002-05-31 Thread Jeff Trefftzs

Hi Juliet,

To get at your new script-fu you need to do the following:

1.  Place the text file (my-new-script-fu.scm) in your own .gimp/scripts 
directory.
In my case, it's ~/.gimp-1.2/scripts
2.  In the gimp, go to Toolbox/Xtns/Script-Fu/Refresh to force a reload of 
the
scripts.

That should do it.

If problems arise, check (a) where you registered the script; (b) that there 
are no leftover editor backup files lying around; and (c) that your scheme 
code has all its proper parentheses and doesn't contain errors.

I have discovered that after long edit/test sessions with a new script that 
things often work better if I restart the GIMP.

If your script-fu is actually a perl-fu, one does it differently.  Perl 
scripts are traditionally saved in the ~/.gimp-1.2/plug-ins directory, and to 
test them from your favorite text editor you need to start the gimp's perl 
server (Toolbox/Xtns/Perl/Server), after which you can run the perl script 
from the command line in your editor.  I have discovered that editor backup 
files for perl scripts in the plug-ins directory do get loaded as plug-ins, 
and may (nay, probably will) mess up your debugging sessions.  So make sure no 
old backup files are left lying around.

I have also noticed problems when working with perl -- if the new 
plugin/script complains about something really strange like a color being bad 
or anything else that seems really off the wall, go into the Toolbox
/Xtns/Parasite_Editor and delete the entry corresponding to the misbehaving 
plug-in.  This happens usually when I have changed something in the interface 
and the parasite contains saved values from the previous version.

HTH,



-- 
--Jeff

Jeff Trefftzs [EMAIL PROTECTED]
http://www.tcsn.net/trefftzsHome Page
http://gug.sunsite.dk/gallery.php?artist=68 Gimp Gallery
http://trefftzs.topcities.com/home.html Photo galleries



___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user