Chapter 1. Introduction

Table of Contents
Status of this Document
Styles in this Document

This document is based on my experiences of writing plug-ins for the GNU Image Manipulation Program in C. Much of this document is likely relevant to GIMP plug-ins in other languages, but I'm too much of a monoglot to know for sure. A basic working knowledge of C is assumed, but extensive experience isn't necessary.

The Source is Your Friend Too. This document contains frequent code snippits, but to get any context, you'll probably want to be working through (reading and/or writing) some plug-in code alongside it. Miles O'Neal has extensively annotated his randomize plug-in, making it a good place to start. You may want to look at several — each one will have their own peculiar parts that they've done well or poorly on.

Status of this Document

This document was authored for version 1.0 of GIMP. But now GIMP 1.1 is now frozen and on its glacial journey towards the 1.2 release. There have been a few changes and a considerable number of additions to libgimp which have yet to been documented here. While that makes this somewhat out of date at current, it is still reasonably accurate, and may serve as an overview for getting started with your plug-in.

In addition, two valueable new resources have been created. One is the libgimp reference documentation, which documents all the functions in the current libgimp. It is distributed in the devel-docs directory of the GIMP distribution, and is also available on-line. The second is the GIMP plug-in template, which contains a skeleton of all the files you need to get started on you own plug-in, including support for autoconf, internationalization using gettext, and GIMP's on-line help system. It's available as the gimp-plugin-template module in the GNOME CVS repository and is mirrored by GIMP plug-ins CVS.

Styles in this Document

Depending on your output medium's implementation of style sheets, you may notice different parts of this document have different styles.


printf("This code was quoted from the GIMP sources.");
/* This is a comment in the source code. */
	

printf("This is example code to illustrate a point.");
/* This is a comment in the source code. */
	

References to the GIMP source code are linked to the LXR engine at cvs.gnome.org. Caution: That may be a newer version of the source than is is use by the general public, but I couldn't find anything else to link to. If you're developing for the stable version of GIMP, check your own copy of the source. Also, line numbers may have changed since I established the links … If you find that to be the case, please let me know.