Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
ThatPainter
digital painting

How to Create a Python GUI Plug-in for GIMP 3

Create a GIMP 3 Python plug-in by registering a procedure and its arguments, then use a generated procedure dialog or custom GTK controls. Learn how to install it and handle interactive, non-interactive, and saved-value runs.

By ThatPainter Team 6 min read
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

ThatPainter is reader-supported. When you buy through links on our site, we may earn an affiliate commission. Learn More

A GIMP 3 Python GUI is built as a plug-in: subclass Gimp.PlugIn, register a procedure and its arguments, then use GimpUi.ProcedureDialog for a standard interface or GTK for a custom layout. The procedure can be launched interactively, called with supplied values, or run using saved values, so it should not assume a person always opens the dialog.

This guide shows the plug-in structure, how to install and discover it, and how to avoid common GIMP 2 compatibility and run-mode mistakes.

What you are building

GIMP is not a general-purpose Python GUI framework. A plug-in runs through GIMP’s procedure system and can provide dialogs, controls, and operations for images.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Python defines a plug-in and the procedures it provides.
  2. GIMP discovers and loads the plug-in.
  3. A procedure exposes its arguments and, when appropriate, a menu command.
  4. GimpUi and GTK provide the interface.
  5. The procedure reads its configuration and performs its operation.

If you need a standalone application that does not depend on GIMP, use a desktop toolkit directly. This article is about interfaces that run inside GIMP.

#1 Best Overall
Wacom Intuos Small, Wired Graphic Drawing Tablet with Pen + Software
  • Wacom Intuos Small Graphics Drawing Tablet: Enjoy industry leading tablet performance in superior control and precision with Wacom's EMR, battery free technology that feels like pen on paper
  • Works With All Software: Wacom Intuos tablet can be used in any software program to explore new facets of digital creativity; draw, paint, edit photos/videos, create designs, and mark up documents
  • What the Professionals Use: Wacom's industry leading pen technology and pen to paper feeling makes it the preferred drawing tablet of professional graphic designers
  • Software and Training Included: Only Wacom gives you software with every purchase. Register your Intuos tablet and gain access to some of the best creative software and Wacom's online training
  • Wacom is the Global Leader in Drawing Tablet and Displays: For over 40 years in pen display and tablet market, you can trust that Wacom to help you bring your vision, ideas and creativity to life

Use the GIMP 3 API

GIMP 3 plug-ins use Python 3, PyGObject and GObject Introspection. Require the Gimp 3.0 namespace and use the GIMP 3 object-oriented API. A GIMP 2 tutorial that starts with from gimpfu import * describes a different plug-in architecture; do not copy it unchanged.

Use the API reference and installed GIMP build that match your target release. Older porting guidance can be incomplete, so verify individual methods rather than assuming a legacy call has a direct replacement.

Choose an interface approach

Approach Best for Trade-off
GimpUi.ProcedureDialog A small set of independent, declared procedure arguments Fast to build and consistent with GIMP, with less control over layout
Dialog fill helpers and GTK widgets Grouped or conditional controls, previews, validation, and specialized workflows More layout control, but more code and synchronization to manage

For a first plug-in, declare the procedure properties and use a generated dialog. Add custom GTK controls only when the workflow needs behavior or layout that the generated interface cannot provide.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Create a minimal plug-in

Create a plug-in class that implements do_query_procedures and do_create_procedure. The first returns the procedure name or names; the second creates a procedure, connects its run callback, sets metadata and menu placement, and declares its arguments. A typical example uses Gimp.ImageProcedure.new for an operation on an open image.

Rank #2
Sale
Drawing Tablet XPPen StarG640 Digital Graphic Tablet 6x4 Inch Art Tablet with Battery-Free Stylus Pen Tablet for Mac, Windows and Chromebook (Drawing/E-Learning/Remote-Working)
  • Battery-Free Pen: StarG640 drawing tablet is the perfect replacement for a traditional mouse! The XPPen advanced Battery-free PN01 stylus does not require charging, allowing for constant uninterrupted Draw and Play, making lines flow quicker and smoother, enhancing overall performance
  • Ideal for Online Education: XPPen G640 graphics tablet is designed for digital drawing, painting, sketching, E-signatures, online teaching, remote work, photo editing, it's compatible with Microsoft Office apps like Word, PowerPoint, OneNote, Zoom, Xsplit etc. Works perfect than a mouse, visually present your handwritten notes, signatures precisely
  • Compact and Portable: The G640 art tablet is only 2 mm thick, it's as slim as all primary level graphic tablets, allowing you to carry it with you on the go
  • Chromebook Supported: XPPen G640 digital drawing tablet is ready to work seamlessly with Chromebook devices now, so you can create information-rich content and collaborate with teachers and classmates on Google Jamboard’s whiteboard; Take notes quickly and conveniently with Google Keep, and effortlessly sketch diagrams with the Google Canvas
  • Multipurpose Use: Designed for playing OSU! Game, digital drawing, painting, sketch, sign documents digitally, this writing tablet also compatible with Microsoft Office programs like Word, PowerPoint, OneNote and more. Create mind-maps, draw diagrams or take notes as replacement for mouse

For example, declare a string argument named note and a numeric argument named opacity, with an appropriate range and default. These declarations provide values to the procedure configuration and allow the standard procedure dialog to generate controls.

In the plug-in entry point, import the GIMP and GimpUi introspection namespaces, require Gimp 3.0 and GimpUi 3.0, define the plug-in subclass, and start it with Gimp.main. Use the official GIMP Python plug-in tutorial for the complete, release-matched code pattern; this article does not claim an untested code listing is ready to run.

How procedure configuration works

The procedure configuration carries the declared arguments. Create a GimpUi.ProcedureDialog with the procedure and configuration, fill it with the declared properties, and, after acceptance, read the updated values from the configuration. For instance, a property named opacity should be read under that exact name.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Initialize GIMP’s UI facilities with GimpUi.init before using GimpUi. This initializes the UI-related libraries and settings for the GIMP process.

Rank #3
Sale
HUION Inspiroy H640P 6x4 inch Drawing Tablet 8192 Pen Pressure
  • Customize Your Workflow: The 6 customizable press keys on Huion H640P drawing tablet for pc let you assign your most-used commands—like undo, zoom, brush switch, or save—so you can keep your hands on the tablet and your mind on the art. Whether you're a digital painter switching brushes, or a comic artist zooming in and out, these keys keep your workflow smooth and uninterrupted. Plus, the Huion driver lets you save different shortcut profiles for different apps, so you never have to reconfigure when switching software.
  • Professional Pen Performance: Huion H640P drawing pad for computer comes with the battery-free PW100 stylus that's always ready when inspiration strikes. With 8192 levels of pressure sensitivity, every light sketch, or bold stroke responds naturally to your hand—just like a real pen. The 5080 LPI resolution and 233 PPS report rate deliver lag-free, precise strokes, so you can draw confidently without second-guessing your cursor. The pen side buttons help you switch between pen and eraser instantly.
  • Compact and Portable: Huion H640P computer graphics tablet features a compact, ultra-portable design at just 0.3 inches thin and 0.61 lbs light, so it slides easily into your backpack—perfect for sketching in coffee shops, taking notes in class, or editing on the go between home and studio. The 6x4 inch active area offers enough room for natural pen movements while fitting comfortably on crowded desks, or lecture hall seats.
  • Stable Compatibility: Huion H640P graphic drawing tablet works seamlessly with Mac, Windows, Linux PCs, and Android smartphones/tablets (OS version 6.0 or later). Left-handed friendly, and you just need to flip the tablet and adjust the settings in the driver. Please note: H640P does NOT support iPhone/iPad.
  • Move Beyond the Mouse: Huion Inspiroy H640P is a pen tablet that replaces your mouse for more natural, precise control. Freehand draw, take notes, or even play OSU—everything you do with a mouse, you can do better with a pen. The precise tip makes it ideal for detailed photo editing, graphic design, or signing PDF. Meanwhile, the ergonomic pen grip helps you avoid the strain that comes from hours of using a mouse.

Handle all run modes

Run mode Expected behavior
Interactive Show the dialog, use its updated configuration after acceptance, and return cancellation without changing the image if the user cancels.
Non-interactive Use the values supplied by the caller; do not prompt for input.
With last values Use the procedure’s saved configuration values; do not assume a fresh dialog is needed.

Menu use is generally interactive, but other plug-ins or automation can call a procedure with supplied values. Treat cancellation as a normal outcome, and avoid showing input or error dialogs in non-interactive execution.

Install the plug-in

  1. Find the GIMP 3 user plug-ins directory in GIMP’s folder preferences or consult the official installation instructions for your operating system.
  2. Create a plug-in directory under that location.
  3. Put the Python file in the directory, giving the directory and script the same base name (the script adds the .py extension).
  4. Make the script executable on systems where that is required.
  5. Restart GIMP so it scans the plug-in directory.

GIMP’s official Python plug-in tutorial specifies the matching folder and script naming convention. Example user paths differ across Linux, Windows, and macOS, so use the location appropriate to your installation rather than assuming one path works everywhere.

Find and test the procedure

  1. Restart GIMP after installation.
  2. Use GIMP’s action search or Procedure Browser to find the registered command.
  3. Run it interactively and check that the dialog’s values reach the procedure.
  4. Test non-interactive and last-values behavior if callers or automation will use the procedure.
  5. Check GIMP’s plug-in error output if discovery or execution fails.

The procedure name and its arguments form an interface for callers. Keep them stable if other plug-ins or automation may look up and invoke the procedure. A caller can find a procedure by name, provide its configuration, run it, and inspect the returned status.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use GTK for custom layouts

Build a custom interface when the plug-in needs related controls, conditional visibility, a live preview, validation, or a multi-step workflow. Use GimpUi widgets where suitable to follow GIMP’s conventions, and GTK for general layout and interaction.

Rank #4
Sale
XPPen Deco 01 V3 10x6 Drawing Tablet, 16K Battery-Free Stylus, 8 Keys
  • Word-first 16K Pressure Levels: The upgraded stylus features 16,384 levels of pressure sensitivity and supports up to 60 degrees of tilt, delivering smoother lines and shading for a natural drawing experience. With no battery or charging needed, it operates like a real pen, making it easy for beginners to create effortlessly. This functionality helps novice artists develop their skills and explore their creativity without the intimidation of complex tools
  • Designed for Beginners: This drawing pad desinged with 8 customizable shortcuts for both right and left-hand users, express keys create a highly ergonomic and convenient work platform
  • Perfectly Adapted for Android: The XPPen Deco 01 V3 art tablet supports connections with Android devices running version 10.0 and above. It is recommended to download the XPPen Tools Android application, which adapts to your smartphone's screen aspect ratio, ensuring accurate mapping. It also supports mapping on Android screens with different aspect ratios in portrait mode
  • Large Drawing Space, Bigger Bold Inspiration: This expansive drawing pad has10 x 6.25-inch helps you break through the limit between shortcut keys and drawing area
  • Easy Connectivity for Beginners: The Deco 01 V3 offers USB-C to USB-C connectivity, plus adapters for USB C. This ensures easy connection to various devices, allowing beginner artists to set up quickly and focus on their creativity without compatibility concerns. Whether using a laptop, tablet, or desktop, the Deco 01 V3 provides a seamless experience, making it an ideal choice for those just starting their digital art journey
Need Possible control
Text input String property or GTK text entry
Opacity or strength Numeric property or GTK scale
On/off option Boolean property or GTK check button
Color or brush selection A suitable GimpUi control and corresponding procedure property
Conditional controls or preview GTK signal handlers with a suitable preview widget
  1. Initialize the GIMP UI facilities.
  2. Create the dialog and its GTK containers.
  3. Initialize controls from the procedure configuration.
  4. Connect signals for validation, conditional behavior, or preview updates.
  5. On acceptance, copy and validate custom control values into the configuration or a settings object.
  6. Perform the operation only after confirmation, then return the appropriate status.

Keep the displayed values and the values used by the operation synchronized. For exact widget constructors, consult the GimpUi API reference for the installed GIMP build.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Develop the image operation safely

  1. First confirm that GIMP loads the procedure and opens its dialog.
  2. Verify that the procedure receives the expected configuration values.
  3. Check whether an image and the required drawables are available.
  4. Validate that the selected drawable supports the intended operation.
  5. Test the smallest possible image change before adding complex processing or preview behavior.

Do not assume a drawable is always present or that a legacy PDB call maps directly to a GIMP 3 method. Consult the GIMP 3 API for the relevant image, layer, selection, or drawable operation and return a useful status when prerequisites are not met.

Debugging checklist

Symptom What to check
The plug-in is missing Confirm the configured plug-ins directory, matching folder and script names, executable permission where required, and restart.
The procedure is not visible Check procedure discovery, procedure creation, and its menu placement.
An import fails Test through the target GIMP build; system Python and packages installed with pip are not automatically available to GIMP.
The operation uses defaults Read the exact configuration property names and synchronize any custom widgets before applying.
The plug-in works only in a console experiment Check procedure registration, run-mode handling, image requirements, and returned status.

When debugging, start with a procedure that reports received values. Add one argument, widget, and image operation at a time so errors are easier to isolate.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Frequently Asked Questions

Can a GIMP Python plug-in create a standalone application?

No. It can create dialogs and other interface elements as part of GIMP, but the application remains GIMP. Build a standalone GUI with a desktop toolkit instead.

Best Value
Sale
HUION Inspiroy H1060P Graphics Drawing Tablet, 10 x 6.25 in, 12+16 Hot Keys
  • Working Area Configuration - HUION art tablet equips with a 10 x 6.25 inches working area, providing the user with the most comfortable size to work; the 10mm slim structure and minimalist design of appearance make the drawing tablet more attractive.
  • Tilt Function Battery-free Stylus: This computer graphics tablet come with a battery-free stylus PW100, no need to charge, allowing for constant uninterrupted drawing. ±60° tilt support enables imitation of lines input with diverse drawing gestures, with accuracy ensured.
  • Press Keys:12 programmable press keys plus 16 programmable soft keys, you can set shortcut keys on drawing tablet's driver based on your preferences, such as erase, zoom in/out, scroll up and down, and so on.
  • Compatibility: HUION graphics tablet supports Windows 7 or later/ macOS 10.12 or later/ Android 6.0 or later/ Linux (Ubuntu). A USB adapter is required to connect to a Mac computer. H1060P supports various mainstream design and drawing software, including PS, SAI, AI, CDR, etc. (Please note: The H1060P is compatible with Ubuntu, but it requires the use of the Xorg display server. Wayland is not supported.)
  • NOTE: You can easily connect your phone to the art tablet via the OTG connector; while iPhone and iPad are NOT at the moment. The cursor will not show up in the SAMSUNG Galaxy S series at present. If you are not sure whether the product is compatible with your Phone or any help, please contact us.

Will a GIMP 2 gimpfu script work unchanged in GIMP 3?

No. GIMP 3 uses a different plug-in architecture and API. Port procedure registration, arguments, image operations, and interface code deliberately, checking each call against the GIMP 3 reference.

Does every procedure need to show a dialog?

No. Interactive calls can show a dialog, but non-interactive calls should use caller-supplied values and last-values calls should use saved values. Choose behavior according to the run mode.

Do I need to install a separate Python package for GIMP?

Not necessarily. A system Python installation or a package installed with pip is not automatically visible to GIMP. Test with the GIMP build and plug-in environment you intend to support.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How do I make a custom arrangement of controls?

Use the dialog’s fill helpers and GTK widgets when the generated procedure dialog is not flexible enough. Initialize controls from configuration, validate and synchronize values on acceptance, and use GimpUi widgets where appropriate.

The Bottom Line

Build a GIMP 3 Python plug-in by registering a procedure and its arguments, then use GimpUi.ProcedureDialog for a standard interface or GTK for a custom one. Handle interactive, non-interactive, and last-values runs separately, install the script in a same-named plug-in directory, and test it with the actual GIMP build you plan to support.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

More from the Paint Desk

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.