GIMP FAQ – Plug Ins


  1. What are plug-ins?
  2. How do I add new plug-ins?
  3. How do I build new plug-ins?
  4. Is there a plug-in for … ?
  5. Why did some plug-ins disappear for 0.99.19?
  6. What is Script-Fu?
  7. Where can I learn about Script-Fu?
  8. How do I call one script-fu script from another?
  9. How do I call a plug-in from script-fu?
  10. How do I execute script-fu from batch mode?
  11. What does “procedural-database-error'' in script-fu mean?
  12. What is Net-Fu? Where is it?
  13. Where can I get the fonts I'm missing?
  14. How can I change the GIMP font?
  15. Why don't the Far Eastern fonts work?
  16. What about TrueType fonts?
  17. What is GIMP's native graphics file format?
  18. What other graphics file types are supported?
  19. Is there any way to keep the layers when I save?


What are plug-ins?

Plug-ins are external modules that actually do the nifty graphics transformations. There is a plug-in registry at with the latest plug-ins, maintained by Ingo Lütkebohle. [Special thanks to Adam Moss for the original registry!]

How do I add new plug-ins?

First, copy the plug-in[s] to your plug-in directory (typically /usr/local/lib/gimp/$VERSION/plug-ins/). After copying the plug-in to its proper directory, just run GIMP. It should automatically find new plug-ins.

How do I build new plug-ins?

You'll need a copy of the source directories. Build GIMP. Place the new plug-in in the plug-ins directory. The docs with the new plug-in hopefully identify any special libraries it needs. Look for a plug-in with similar libraries (if all else fails, look at xpm and whirlpinch). With newer versions, if the plug-in is contained in a single source file, you should just have to run gimptool in the plug-in's directory :

  • gimptool –build plugin.c

For older versions, there are several methods. The first two walk you through a number of steps manually; these are the most thorough, but also require more work on your part. The last ones are scripts of one sort or another, and are easier on your part — if they work with your system. Go ahead and try – you can always fall back on the first methods.

  • The best way to procede is to edit the Makefile. Pick a similar plug-in (such as whirlpinch). For the SRC and OBJ lines, just add entries similar to the others, but with the new plug-in's name. Now, find all the groups of lines with the other plug-in's name in them, duplicate them, and change the old name to the new name. The one exception is the huge set of lines that have a lot of paths that end in .h – do not bother with these. Now, just type
    • make
      • and it should build. Install it wherever your other plug-ins are installed.
  • A second choice for those who don't want to mess with the main Makefile is to build a file to create just the new plug-in. Start the same way – pick a similar plug-in. Now remove the binary and object files for the one you just picked. For instance, if you selected the whirlpinch plug-in, you will see the following files:
    • whirlpinch whirlpinch.c whirlpinch.o
      • In this case, you would remove the first and last files, leaving the whirlpinch.c file. Now type


      • to rebuild the old plug-in.Copy the output (cut and paste it!) into a file. Edit the file and change all occurances of "whirlpinch" (or whatever) to the name of the new plug-in. Execute the file you just edited. For instance, if the file is make_plug-in, just type


      • and it should work. The copy the plug-in to wherever the others are installed on your system.
  • A Makefile
    • First, load Makefile-pi provided by Ciccio C. Simon . Change all occurances of the word sharpen in Makefile-pi to the name of the new plug-in. Then type
    • make -f Makefile-pi
      • and watch it (hopefully) work.If it doesn't work, try the next method.
  • A compile script
    • First, load the compile-pi script provided by Jeremy Dinsel . Change the permissions on compile-pi as follows:
    • chmod ugo+rx compile-pi
      • and type

      compile-pi help

      • for instructions. Follow those instructionms. If this one also fails, go back to the earlier, manual methods; you have too picky a configuration for the simple methods to work.

If you need more help, ask your system administrator or a handy programmer, or get a good book on make (such as O'Reilly's). You may want to join the GIMP developer's list as well (see the Developer FAQ).

Is there a plug-in for … ?

The plug-in registry referenced above is the place to check.

Why did some plug-ins disappear for 0.99.19?

Some of the plug-ins have proven unstable. These have been moved into a separate download, which should be available wherever you got the GIMP, in the file gimp-plugins-unstable-VERSION.tar.gz or gimp-plugins-unstable-VERSION.tar.bz2 . Since this list may change frequently, the unstable plug-ins are no longer listed here. Script-Fu

What is Script-Fu?

In the words of S&P:

  • Script-Fu is the first GIMP scripting extension. Extensions are separate processes that communicate with the GIMP in the same way that plug-ins do. The distinction is that extensions don't require an active image to operate on, instead extending GIMP's functionality. GIMP internals for version 1.0 have been completely overhauled from version 0.54. In particular, the plug-in API has been made far more general with the advent of the procedural database (PDB). The PDB allows GIMP and its plug-ins to register procedures which can then be called from anywhere: internally, from extensions, and from plug-ins. There are already over 200 internal GIMP procedures, and more being created all the time. Because all of these procedures can be easily invoked from extensions, the logical next step was to create a scripting facility; thus, Script-Fu was born.

Where can I learn about Script-Fu?

As with plug-ins, web pages, COBOL, or anything else, one of the best things you can do is look at other peoples' code, and play with it. But it helps a lot if you know Scheme.

How do I call one script-fu script from another?

The trick to calling script-fu-scripts from another script is to just reference the main define for the script and not to try to use the pdb call. All the scripts in script-fu share a common name space; you call other scripts just like a regular function / define / whatever you call those those things in_scheme. Ie, to call script-fu-predator in a script, just use

  • (script-fu-predator img drawable 2 TRUE 3 TRUE TRUE)

For examples, see

How do I call a plug-in from script-fu?

The following examples assume the plug-in name is "plug_in_randomize_hurl", and the plug-in has four parameters specific to it, the first two of which are floats, and the next two ints. From the script-fu console, call a plug-in like this:

(plug-in-name 1 0 0 100.0 1.0 10 0)

The first parameter should always be a "1". The next two are the image number and drawable. Anything following these numbers will be plug-in parameters, which depend on the plug-in. Inside an actual script, call a plug-in like this:

 (define (script-fu-fred img drawable)        (plug-in-randomize-hurl 1 img drawable 100.0 1.0 10 0)      (gimp-displays-flush)        )        (script-fu-register "script-fu-fred" "<Image>/Script-Fu/fred"      "Randomize test" "Miles O'Neal <[email protected]>" "Miles O'Neal"      "1998/May/1" "RGB*, GRAY*, INDEXED*" SF-IMAGE "Image" 0 SF-DRAWABLE      "Drawable" 0)

How do I execute script-fu from batch mode?

Invoke the script as non-interactive and add a pair of escaped quotes around each string just like you do in (script-fu-register). You DO NOT need to replace '-' with '_' in any names or registrations. Example script:

 (define (script-fu-famhist-link text filename) ;; code ommitted  for brevity (file-gif-save 1 img 0 filename "" FALSE FALSE 0 0))    (script-fu-register "script-fu-famhist-link"  "<Toolbox>/Xtns/Script-Fu/Family Historian/Link" "Family Historian  Link" "John Johnson" "John Johnson" "1998" "" SF-VALUE "Text String"  "\"Family Historian\"" SF-VALUE "Base filename" "\"foo\"")    Example Invocation:    ;; note the '1' as the first argument tell it to run non-interactivly ;;  note the \" \" pairs around the strings    gimp -n -b  '(script-fu-famhist-link 1 "\"Introduction\"" \  "\"intro.gif\"")' '(gimp-quit 0)'

For a detailed, step by step explanation, check out Adrian's GIMP Batch Mode how-to at .

What does “procedural-database-error'' in script-fu mean?

Normally it means that the script is trying to use a particular font that isn't available on your system – it's either not installed or not in your X server's FONTPATH. The base script-fu package makes extensive use of the freefont package, and at least one font (AlfredDrake) from the sharefont package.

What is Net-Fu? Where is it?

Net-fu is a web-based interface to a script-fu server. The work is done at a remote site. To see Net-fu, point your web browser at or one of the miiror sites, and then go to "gimp/net-fu/". Any web browser can read net-fu pages; the browser must be Java-enabled to actually run Script-fu. Fonts

Where can I get the fonts I'm missing?

The freefonts and sharefonts packages are both available or other metalab mirrors. If you get the sharefonts package, be sure and read the various licensing agreements, and abide by them.

How can I change the GIMP font?

You need to copy the gtkrc file that comes with the GIMP source (in the top level directory) into $HOME/.gimp/gtkrc . As of 0.99.10, this should be recognized. You then go in and edit the default font style, the one that looks like this:

 style "default" { font =  "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*" }

I'm sure ther's a lot of clever stuff that can be done here, and I'll try to track it down soon, but in the meantime, just change that "100" to something larger, like "120" or "140". (The number is points= 10, so 100 is a 10 point font). Obviously, you could stick in any font you have available.

Why don't the Far Eastern fonts work?

These are 16 bit fonts, with thousands and thousands of characters. And the characters are more complex, which means (usually) more bits per character, which means more memory and more processing time. This includes fonts such as kana, kanji, song ti, mincho and gothic. (If you look carefully at the fully qualified font name for gothic via xfontsel, you'll see clues. It's a daewoo font. The gothic name is misleading to western minds, but no doubt means something to its author[s].) Check one of these out in a program that shows a font as pages (such as xfd).. You can keep hitting next page to see a new page of characters, almost forever.

What about TrueType fonts?

If neither your X server nor your X font server supports you can try one of the TruType font servers: xfsft ( . xfstt supposedly has limitations on the font size. File Formats

What is GIMP's native graphics file format?

XCF is GIMP's "native" format. This will preserve all information about an image, including the layers.

What other graphics file types are supported?

All the common formats, and many more as well, including GIF, TIFF, JPEG, XBM, XPM, PostScript, and BMP. Plug-ins are used to load and save files so adding new file types is very simple, compared to other graphics programs. As of July 1, 1998, the list of supported types included BMP, CEL, FITS, FLI, GBR, Gicon, GIF, GIcon, HRZ, JPEG, PAT, PCX, PIX, PNG, PNM, PostScript, SGI, Sun Raster, TGA, TIFF, XPM, XWD and XCF. Bzipped, Gzipped and Xdelta'd files are understood, and URL support is provided. Of course, plug-ins for other types may be available at the plug-in registry .

  • Why can't I save my image as a GIF (or whatever)?

The two most likely problems are related to image type and layers. For instance, your image type must be "Indexed" for GIF, but "RGB" for TIFF. Try a different image type (look under the "Image" menu). If you have more than 1 layer in your image, you probably need to merge the visible layers, and/or "flatten" the image. Both operations are available under the "Layers" menu or from the "Layers" dialog. Flattening will destroy any background transparency.

Is there any way to keep the layers when I save?

Yes; GIMP has a file format just for this – the XCF format. Don't flatten the image or merge the layers as you would to save to other formats! This will only work with the XCF type.

Why can't I open or save JPEG / JPG files?

Why can't I open or save GIF files? Why can't I open or save PNG files? Why can't I open or save XPM files? Why can't I open or save TIFF / TIF files? Why can't I open or save PSD files? Why can't I open or save SOME_FORMAT files? There are several possibilities.

  1. If the file type appears in the Save dialog but is grayed out, you may need to change the image type. For instance, you can't save an RGB as a GIF (convert to indexed first) or an indexed image to JPEG (convert to RGB first).
  2. GIMP comes with full support for a few types built in. If the type you want doesn't appear in file type format of the Open and Save dialogs, you need to check the Plug-in registry to see whether you need to download an optional plug-in.
  3. Some of the file types, such as JPEG and TIFF, require extra libraries (described elsewhere). Make sure you have the correct versions of these on your system.