Chapter 22. Creating Custom Effects with Scripting
IN THIS CHAPTER
Getting familiar with GIMP scripting
Using scripting interactively
Creating a custom script
One of the most useful features of GIMP is its extensibility. You have ultimate control over GIMP's features because you have the ability to automate them or add new ones if necessary. For instance, quite a few examples in this book are given as a sequence of discrete steps that you have to perform in GIMP. If you find yourself repeatedly performing the same sequence of steps to get a specific effect, you can write a script to automatically perform those steps for you. It may be a bit of a cliché, but think of a script as a recipe. It's a sequence of steps used to produce a final result. In cooking, that final result might be a pie. In computer graphics, the final result may be an improved image.
To facilitate the scripting process, the developers of GIMP have included a scripting Application Programming Interface (API). A scripting API is a set of operations and tools that can be accessed from a higher-level scripting language like Scheme or Python. With an API as your specification, you don't have to dig through lines and lines of source to find the function you're looking for and you don't have to do any guesswork to figure out how your code fits in the overall source tree. You find the operations that you need and can then write a little script that automates some useful task for you. That script can then be saved for re-use ...
Get GIMP Bible now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.