This page explains the basics of GIMP scripts, what they can do, where to find them and how to install them. What this page does not do is explain how to write them. That is HUGE subject and one I am not qualified to write on.
GIMP scripts are similar to Photoshop "Actions" in that they can automate repetitive processes but differ in several ways:
- Photoshop actions can be recorded by the user, GIMP scripts cannot.
- Photoshop actions are always in the same place and are clearly marked as actions.
- GIMP scripts can be placed anywhere and can be made to appear as if they are a new function.
- Photoshop actions use absolute values (eg select 2000 x 3000 pixels, no matter how large the image is)
- GIMP scripts can calculate variables based on the image attributes. (eg start at 1/3 down the image and select the second third)
- GIMP scripts can check attributes of the image and halt or display messages when certain conditions are met or not met.
So GIMP scripts are more complex to create than PS actions but they are also more flexible and powerful.
What scripts can do
GIMP scripts add, extend and automate functions that GIMP already has built-in or are provided by other scripts. In doing so it appears that a new function has been added. Some scripts have a dialog box at the start where you can alter different variables that the script will use to produce it's final output.
Where to find them
How to install them
First you have to decide if you are going to make this script available for all users as a Global script or just a single user as a local script. If you don't have access to create files in the Global location then you can only install them as a local script.
Microsoft Windows and Linux use different file system structures so they require you to save the files in completely different locations. The default file locations are as follows:
- User: Download the file to C:\Documents and settings\<username>\.gimp-2.2\scripts
- Global: Download the file to C:\Program Files\GIMP-2.0\share\gimp\2.0\scripts
- User: Download the file to ~/.gimp-2.2/scripts
- Global: Download the file to /usr/share/gimp/2.0/scripts
Where did the script go?
Often you have just installed the script and now you can't find it. There are several reasons for this and I will explain how to find the new script.
First, when GIMP starts it reads both the Global and user script locations. So if you have added the script while The GIMP was running you will not see it, yet. One solution is to close GIMP and re-open it allowing it to read and add the new script. Another is to manually tell GIMP to read the script locations while it is still running. To do this just go <Toolbox> / Xtns / Script-Fu / Refresh scripts
Ok, GIMP has read the script where do I find it?
GIMP scripts can be placed by the author anywhere they want. The two main locations are in the main GIMP window or in the menus in the Image window.
As a general rule scripts that alter the image are placed on the image menus and ones that create a new image from scratch are placed in the menus on the main GIMP window.
So how do I find which menu the author put the script in?
Find the script that you downloaded and open it with a text editor (like notepad), one of the last lines of the script will look like this:
Within that bracketed section will be which window and menu it will be under, it will look something along the lines of:
So to run the script that this code is from you would have an image open then go to the Script-Fu / Decor menu and in that you will find the name of the new script.
How do I know what the crazy author called the menu entry?
Most times it is obvious but just in case it's not once again open the script with a text editor (if you closed it already) and look for the section at the bottom:
(Please note this is a different section from last time the "menu" is missing from the start)
In that bracketed section there will be a line that looks like:
In summary for a new script you would:
- Download the script from GIMP Registry (to your choice of location)
- Refresh the scripts (closing and opening GIMP or manually refreshing)
- Open the script to find where in the menu system the author placed it and what they called it
- Use the script (the above example would be used by going "<image> / Script-Fu / Decor / Translucent Border…")
- Photography Tutorials