Usage

Installation

Files

Binary releases can be downloaded from the GIMP website at http://www.gimp.org/downloads/.

They usually include an installation assistant which guides the user through the installation process.

Installation Instructions

Installation instructions are available for Unix, Mac OS X, and Windows systems. Please refer tohttp://www.gimp.org/downloads/ for detailed instructions.

Quick Start Guide

The first step for using GIMP as a command-line tool for image processing is to learn the scripting language “Script-Fu”. The easiest way to learn writing scripts in Script-Fu is to try out the different commands using the Script-Fu console. Just start the GIMP software and in the navigation bar of the graphical user interface choose Filter > Script-Fu > Console. The GIMP documentation provides a tutorial on how to get started with the language and how to write simple scripts:http://docs.gimp.org/2.8/en/gimp-using-script-fu-tutorial.html

The following example script takes a filename and some numeric parameters. It opens the respective file, applies the Unsharp Mask filter and saves the image again:


(define (simple-unsharp-mask filename

radius

amount

threshold)

(let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))

(drawable (car (gimp-image-get-active-layer image))))

(plug-in-unsharp-mask RUN-NONINTERACTIVE

image drawable radius amount threshold)

(gimp-file-save RUN-NONINTERACTIVE image drawable filename filename)

(gimp-image-delete image)))

In order to do image processing from the command-line, you usually use GIMP’s Script-Fu batch interpreter. This interpreter is called by using the “-b“ parameter with the GIMP executable:


-b, --batch=<commands>  Batch command to run (can be used multiple times)

To run the above example, save the script with the .scm extension in the scripts directory. Then run it like this:


gimp -i -b '(simple-unsharp-mask "foo.png" 5.0 0.5 0)' -b '(gimp-quit 0)'

More examples and explanations on how to use the GIMP bacth mode can be found here: http://www.gimp.org/tutorials/Basic_Batch/.

Documentation

Configuration and Customization

All configuration and customization is achieved by writing scripts that instruct GIMP how to process an image. Details and examples can be found on the documentation website athttp://docs.gimp.org/2.8/en/gimp-scripting.html

Workflow Integration

GIMP can be integrated into any workflow or application that allows the execution of command-line tools. However, the actual execution parameters depend on the script that is executed with the GIMP batch interpreter.

Examples

For examples on how to use the GIMP Batch Mode, please refer to the tutorial provided at http://www.gimp.org/tutorials/Basic_Batch/ and http://docs.gimp.org/2.8/en/gimp-scripting.html. Additional examples are provided at http://www.gimp.org/tutorials/Basic_Scheme/ and http://www.gimp.org/tutorials/Basic_Scheme2/.