Paul Vosper: Technical Artist

GIMP: 5 Things I Wish I Had Known

GIMP is powerful image-processing software that is constantly evolving. Inevitably, this means that some of the documentation you’ll find on the internet is out of date, so can be misleading. As a new user, I was often frustrated by my code not working like the examples. It usually didn't take more than an hour or two to figure out any discontinuities, but there were a handful of things I did wish I had known from the start.

  1. Plug-In Directory
    • Python-Fu files are plug-ins, not scripts
    • Defined in Preferences > Folders > Plug-Ins
    • /Users/paulvosper/Library/Application Support/GIMP/2.8/plug-ins
  2. Python Version
    • GIMP 2.8.22 uses Python 2.7.8
    • Each file requires:
      #!/usr/bin/env python
    • MacOSX High Sierra 10.13.1 uses Python 2.7.4
    • Local env variable references Python 3.6.1
  3. Menu location
    • Requires two params:
      • "Label", # label that the plug-in uses in the menu
      • menu="/Local") # location in menu bar
    • Previous versions had combined these two into a single line
  4. The number and ordering of input parameters must match
    • Input parameters must match number and ordering of registered parameters
    • Names do not need to match
  5. GIMP 2.8.22 file saves .xcf format only
    • This has changed from older versions, where
      would respect file extensions
    • PNG &etc is available as
    • This now works the same as most DCC apps - it's just different than it was

There were a number of references online that I found immensely valuable:

Learning to write Python in GIMP was a fun exercise that allows me to create powerful image-processing tools. There were a small handful of things that tripped me up, but they were easily worked through with a bit of experimentation and persistence. I'm looking forward to further GIMP projects!