Writing GIMP scripts and plug-ins


Learn to write GIMP scripts in Python and Script-Fu

Much of the power of GIMP, the GNU Image Manipulation program, comes from its plug-in architecture. Most of the functions you use in GIMP, including everything in the Filters menu, are plug-ins or scripts. Wouldn't it be great to be able to write some scripts and plug-ins of your own? In this tutorial, you'll learn to write GIMP plug-ins and scripts in two languages: Python and Script-fu. Python is rapidly becoming the language of choice for writing GIMP plug-ins on Linux because of its flexibility, power and clean API. You'll see how easy it is to create a simple Python plug-in or modify an existing one. You'll also learn how to use GIMP's built-in developer documentation as well as where to find documentation online. And you'll see how you can use Python and PyGTK to create interactive plug-ins with custom user interfaces, and how to access image pixels directly. Script-fu isn't as powerful as Python, but it has a few other advantages. As GIMP's native language, you can count on users having it already, so your script-fu scripts will be useful to any GIMP user on any platform. And learning how to use it is easy, since there are at least a hundred helpful script-fu examples already installed on your machine. Script-fu is a variant of Scheme, but you don't need to be fluent in Scheme or Lisp to write Script-fu. With a few basics of Lisp syntax and knowing how to use GIMP's built-in help, you're all ready to write simple scripts you can share with the world.

Speaker: Akkana Peck