Sign up now! · Forgot password?
RSS/Atom feed Twitter

Installing additional scripts

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.

3 of 4 messages available
Toggle history

Please log in to manage your subscriptions.

Installing additional scripts Juliet Jennifer Mari R 31 May 16:05
  Installing additional scripts Joel 01 Jun 00:37
julietjmarie@icqmail.com 07 Oct 20:15
  Installing additional scripts Jeff Trefftzs 01 Jun 01:23
Juliet Jennifer Mari R
2002-05-31 16:05:25 UTC (over 19 years ago)

Installing additional scripts

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, gimp-user-request@lists.xcf.berkeley.edu wrote:

Sender: gimp-user-admin@lists.xcf.berkeley.edu To: gimp-user@lists.xcf.berkeley.edu Delivered-To: icqmail.com%julietjmarie@icqmail.com 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:
List-Subscribe: ,

X-Received: 30 May 2002 19:01:04 GMT Errors-To: gimp-user-admin@lists.xcf.berkeley.edu Precedence: bulk
List-Unsubscribe: ,

List-Post: Subject: Gimp-user digest, Vol 1 #369 - 3 msgs List-Help:
From: gimp-user-request@lists.xcf.berkeley.edu List-Id:
X-Mailman-Version: 2.0.8
X-Beenthere: gimp-user@lists.xcf.berkeley.edu Return-Path:
Mime-Version: 1.0
Reply-To: gimp-user@lists.xcf.berkeley.edu Date: Thu, 30 May 2002 12:01:06 -0700 (PDT) X-Mailer: Mailman v2.0.8
Message-Id:

Send Gimp-user mailing list submissions to gimp-user@lists.xcf.berkeley.edu

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 gimp-user-request@lists.xcf.berkeley.edu

You can reach the person managing the list at gimp-user-admin@lists.xcf.berkeley.edu

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
To: gimp-user@scam.xcf.berkeley.edu
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: gimp-user@scam.xcf.berkeley.edu
Subject: Re: [Gimp-user] Losing precision From: Roland Roberts
Date: 30 May 2002 13:30:24 -0400

"John" == John Culleton 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

Joel
2002-06-01 00:37:07 UTC (over 19 years ago)

Installing additional scripts

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//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//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"
_"/Script-Fu/MyScript" 0
)

--Joel

Jeff Trefftzs
2002-06-01 01:23:17 UTC (over 19 years ago)

Installing additional scripts

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 /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 (/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 /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,