Interactive luminosity masks in GIMP 3: super easy

I’ve updated my luminosity mask plug-in for GIMP 3—now it’s interactive with real-time previews, and translated!

Interactive luminosity masking in GIMP featured image with headline including "flexible, adjustable, easy", screenshot of a greyscale luminosity mask of a mountain, and a "fine tune your mask" dialog with sliders for lights, midtones, and blacks.

Why do we need a new GIMP luminosity mask solution?

The release of GIMP 3 opens up exciting opportunities to update and extend what plug-ins can do. So I completely rewrote my GIMP 2 luminosity mask plug-in to take advantage of those new tools.

This new interactive luminosity masks GIMP plug-in lets you choose whether to focus on lights, midtones, or darks. Then it opens a live preview and a dialog with sliders that allow you to fine-tune your luminosity mask. That’s a much more flexible approach than was available in GIMP 2.

What languages is the plug-in available in?

This interactive luminosity mask plug-in for GIMP 3 is available in the following languages. You don’t have to do anything to see it in your language. GIMP will automatically load the correct version of the plug-in (provided you follow the installation instructions below).

  • Nederlands (Dutch)
  • English
  • Français (French (Français)
  • Deutsch (German)
  • Italiano (Italian)
  • Magyar (Hungarian)
  • 日本語 (Japanese)
  • Polski (Polish)
  • Português (Portuguese)
  • Español (Spanish)
  • Українська (Ukrainian)
  • 简体中文 (Chinese (Simplified))
  • 繁體中文 (Chinese (Traditional))

If you have any suggestions to improve those translations, please leave a comment below.

The .pot localisation file is included with the downloadable .zip file for the GIMP 3 version of this plug-in. If you generate localisation files for additional languages, please share them!

Where do luminosity masks come in handy?

In case you’re new to photo editing, luminosity masks allow you to select specific tonal ranges in an image without affecting the rest of the image. Luminosity masks focus on luminosity values to create complex selections that aren’t possible with simple selection tools. Madhu Manickam at photographylife.com has written a short tutorial explaining luminosity masks.

Some of the most common types of photography where luminosity masks are especially helpful include:

  • Landscape photography—balancing exposure, adjusting colour, and enhancing details without over-processing.
  • Architectural photography—refining contrast and highlighting details in buildings and structures.
  • Fine art photography—creating dramatic effects and controlling light and shadow for a more artistic expression.
  • High dynamic range (HDR) photography—blending multiple exposures seamlessly to achieve a balanced image.
  • Black and white photography—refining tonal contrast and ensuring smooth transitions between highlights and shadows.

How do you create luminosity masks with this plug-in?

  1. First, open the image you want to work with if it’s not already open.
  2. Now choose Layer > Luminosity masking from the GIMP menu.
  3. In the mask selection dialog that opens, select the type of luminosity mask you want to build on: lights, midtones, or darks. There are three variations of each of those types: general, narrow, and narrower. The plug-in will display a preview of the mask type you select. You can move the dialog out of the way to see the preview as necessary.
  4. The plug-in will add a new layer to your image and add a mask to that new layer, initialised to focus on the tonal range you selected. Then it’ll turn on mask view (show mask) so you can see the initial state of the mask.
  5. You’ll see a fine-tuning dialog with three sliders that correspond to the adjustment points in the GIMP levels adjustment dialog. Play around with them to see how the affect the mask if you want to fine tune it.
  6. Click OK and your mask will be finalised. Mask view will be turned off so you can get cracking with adjustments to the masked layer.
  7. If you want to further refine the luminosity mask, turn its visibility on, select the mask, and use Colours > Levels or Colours > Curves to adjust it.
  8. Use the new luminosity-masked layer to adjust your image, and/or copy the luminosity mask to another layer.

Here’s an example of how luminosity masking enhances a photo

Landscape photography is a prime example of how luminosity masking can enhance an image. In this case, I wanted to accentuate the snow-covered branches. Selecting just the snow on the branches and not the branches themselves would have been impossible using normal selection tools. A luminosity mask selecting for lights made it simple to focus just on the branches.

A luminosity mask also has the advantage of showing/hiding across a spectrum of luminosity values. In this case, the background trees are more faintly highlighted than the foreground tree. The luminosity mask shows them more dimly.

Just using an S or more complicated curve on this image would have required a lot more work, and delivered less accuracy. A luminosity mask is perfect for the job in this case.

Blue toned image of a tree next to a hunters’ blind in a field, with show covered forest on a hill behind them.
Example: image before luminosity masking
Black and white high contrast image of a tree next to a hunters’ blind in a field, with show covered forest on a hill behind them.
Example: luminosity mask
Blue toned image of a tree next to a hunters’ blind in a field, with show covered forest on a hill behind them.
Example: image after luminosity masking and curves adjustment

Here’s the before and after for easier comparison:

Credit where credit is due

I’ve used Greg Benz’s Lumenzia Photoshop plugin for years. In this video, he explains luminosity masks from the perspective of why he developed Lumenzia.

When creating a luminosity mask with Lumenzia, you can pause during the process and adjust levels on the mask to refine it. That’s a tip I shared in my GIMP 2 luminosity masks plug-in. And it’s the basis for this new GIMP 3 version.

Another Photoshop luminosity mask plug-in I use and love is Sven Stork’s Interactive Luminosity Masks. Sven’s plug-in uses sliders and what looks like curves to create and adjust luminosity masks in real-time. It’s an intuitive approach, easy to learn and use. I wrote a rave review about it in 2024, and it’s the inspiration for this interactive luminosity masks plug-in for GIMP 3.

And of course there’s the pioneering work of Pat David, Saul Goode, and “offnuts”. I covered their contributions to GIMP luminosity masking in my article about my plug-in for GIMP 2, which built on their code.

How to install the plug-in

This plug-in is supported on Linux and Windows. It is not supported on macOS due to macOS’ limited support for GTK.

If you want to be notified of any updates to this plug-in, please leave a comment below. I’ll use your email to notify you. And if you have any suggestions for enhancements, please also include them in a comment below.

If you run into any problems with any of the steps below, please let me know in the comments below.

1. Download the plug-in

Download the GIMP 3 interactive luminosity mask plug-in as a ZIP file. You’ll extract it as described below in the next section:

interactive-luminosity-masks-v3.zip

2. Copy the downloaded file to where GIMP looks for plug-ins

This is something you have to do for every plug-in you add to GIMP. I discovered that the only reliable way is as follows.

Find where GIMP looks for plug-ins:

  1. Open GIMP if it’s not already open and select Edit > Preferences in the GIMP menu.
  2. In the Preferences dialog, scroll down the list on the left until you find Folders, then click on the expand icon in front of the word to expand that list.
  3. Scroll down the list of folders and select Plug-ins.
  4. Still in the Preferences dialog, on the Plug-in Folders panel on the right, select the plug-in folder that’s listed for your user name.
  5. Click on the “Show file location in the file manager” to open your computer’s file manager.
  6. Copy the .ZIP file you downloaded into that folder and extract it there. You should see a subfolder named “interactive-luminosity-masks-v3”. The plug-in is inside that folder (see the note below for why it should be in its own subfolder). Don’t move it, just leave it in that subfolder.
  7. Files downloaded from the internet or transferred across systems may not retain their “executable” flag, especially on UNIX-based systems like Linux. The .py file needs the correct permission to be executed as a script. It’s a quirk of the different operating systems’ security models.
    • Linux:
      You should be able to right click on the .py file and set the permission to allow it as an executable (see below for an example screenshot). Or you could set it in your Terminal app with the command chmod +x [PATH TO WHERE YOU EXTRACTED THE PLUG-IN FOLDER]/interactive-luminosity-masks-v3.py (GIMP 2) chmod +x [PATH TO WHERE YOU EXTRACTED THE PLUG-IN FOLDER]/interactive-luminosity-masks-v3/interactive-luminosity-masks-v3.py (GIMP 3). For example, with GIMP 3 I extracted the plug-in folder into a subfolder of Documents, so the command would be chmod +x "Documents/GIMP plug-ins/interactive-luminosity-masks-v3/interactive-luminosity-masks-v3.py".
  8. Switch back to the GIMP Preferences dialog, and select the “Add a new folder” icon, then click on the icon for “Open a file selector to browse your folders” to … open a file selector to browse your folders.
  9. In the file selector, navigate to the interactive-luminosity-masks-v3 subfolder you added already, select it, and click OK. You should see something like this (a Windows screenshot but the same principle holds true for Linux):
Screenshot of the GIMP Preferences Folders Plugins dialog, as an exampe of where to point GIMP to the plugin
Screenshot of the GIMP Preferences Folders Plugins dialog, as an exampe of where to point GIMP to the plugin

Click OK in the Preferences dialog to close it. When you close the Preferences dialog you’ll be prompted to restart GIMP for the change to take effect.

Screenshot showing example of how to set the interactive luminosity masks plugin as executable
Screenshot showing example of how to set the interactive luminosity masks plugin as executable in Linux

3. Register the plug-in with GIMP

Now you have to register the plug-in with GIMP: just close and re-open GIMP.

If all has gone according to plan, you should find a menu entry called Layer > Luminosity Masks >. If not, please leave a comment below.

4. Optional: create a keyboard shortcut

If you want to assign a keyboard shortcut to a luminosity mask menu item, go right ahead:

Configure keyboard shortcut dialog in GIMP 3, showing the word "luminosity" in the search field and the "Luminosity masking" menu item in the action list.
The keyboard shortcut dialog in GIMP 3

Why it’s important to follow these steps

GIMP version 3.x requires that every plug-in must live in a folder with exactly the same name as the plug-in file. So for example, you add the subfolder where you’ve saved the plugin file to the list of folders where GIMP looks for plugins, and that folder needs to be named exactly the same as the plug-in with that subfolder.

So for this situation, when you unzip the plug-in download, you should see a folder named “interactive-luminosity-masks-v3” and that folder should contain a single file, “interactive-luminosity-masks-v3.py”.

This is an example of how working with free software isn’t entirely free—you have to do some of the work that other systems automate, and put your thinking cap on. Bear in mind that GIMP is developed and maintained by volunteers who donate their time and talents as and when they can. So sometimes documentation lags behind development.

How to manage any layer mask in GIMP (including your luminosity masks)

You can manage a GIMP luminosity mask the same way you handle any other layer mask in GIMP. And you can make it even easier if you can create keyboard shortcuts for any of the following actions: Edit > Keyboard Shortcuts.

How to show a layer mask in GIMP

Show a layer mask to reveal the mask instead of the layer contents; this allows you to visualise the mask and edit it if you want.

Right click on the layer mask thumbnail and choose “Show Layer Mask”.

How to hide a layer mask in GIMP

Hide a layer mask to reveal the layer contents; the layer mask remains in place and functional, without displaying it.

Right click on the layer mask thumbnail and unselect “Show Layer Mask”.

How to disable a layer mask in GIMP

Disable a layer mask to temporarily stop it from affecting the layer, without deleting the mask entirely.

Right click on the layer mask thumbnail on the layer, choose “Disable Layer Mask” or use the keyboard shortcut CTRL/CMD and left click on the mask thumbnail.

How to delete a layer mask in GIMP

Delete a layer mask to remove it from the image.

Right click on the layer mask thumbnail on the layer, choose “Disable Layer Mask” or use the keyboard shortcut CTRL/CMD and left click on the mask thumbnail.

Now you can use luminosity masks in GIMP

Please let me know if you have any questions or thoughts you want to share in the comments below.

FAQ

In what languages is the interactive luminosity mask plug-in available?

Dutch, English, French, German, Hungarian, Italian, Japanese, Polish, Portuguese, Spanish, Ukrainian, Chinese (Simplified), Chinese (Traditional).

Does GIMP support luminosity masks?

Yes, you can create luminosity masks. There are a variety of ways to do it. It’s easy with a plug-in, challenging without.

How can I create a luminosity mask in GIMP?

Using the “Interactive Luminosity Mask Plug-in”: Choose Layer > Luminosity masking in the GIMP menu (installed by the plug-in). Select the type of luminosity mask you want. Then use sliders to fine tune the luminosity mask.


Comments

7 responses to “Interactive luminosity masks in GIMP 3: super easy”

  1. Hi,

    I’m using GIMP 3.0.6 on Linux. There seems to be a peculiarity in that no plugins or scripts will load (including from your good self) despite triple checking the correct directories. It seems to be a problem perhaps with this version of GIMP rather than your plugin. I’m trying to ditch Adobe and move to GIMP and Darktable. I have used GIMP in the past (then upgraded!) and never before found problems with plugins.

    Can you help at all?

    Many thanks

    1. Thanks for getting in touch.

      I don’t think plugins not loading is an issue with 3.0.6 per se – I’m using them in 3.0.6 on Ubuntu no problem. You can test whether your installation is loading any plugins by navigating to Help > Plug-in Browser: if you see anything listed there then GIMP is loading at least the plugins bundled with GIMP itself.

      Have you marked the relevant plugin “.py” filMake sure the “Execute” or “Allow this file to run as a program is ticked.

      After you make the .py file executable, close GIMP, then re-open it. You should find my plugins in the Layers menu.

      Please give that approach a try and let me know how it goes.es as executable? That’s usually necessary on Linux when downloading plugins. Also GIMP 3 requires each plugin to reside in its own folder in a location where GIMP knows where to look for them. I outline the steps necessary to install any plugins for GIMP 3 in my articles introducing my plugins. My downloadable plugin .zip files already contain the correct folder structure, so you should be able to copy the .zip file to your personal plugins location, and use “unzip here” to extract the correct plugin subfolder.

      For example, here’s the instructions for my interactive luminosity masks plugin:

      https://www.chuckhenrich.com/gimp-interactive-luminosity-masks/#2-copy-the-downloaded-file-to-where-gimp-looks-for-plug-ins

      Once you’ve downloaded a plugin .zip file from any of my blog posts – and followed the instructions in the blog posts – you should end up with a subfolder looking something like this:
      Screenshot of a typical GIMP plugin installation, showing the folder structure and GIMP executable .py file.
      Leave everything in that folder alone. The only thing you need to take care of is the the .py file you see there. That’s the plugin file that you probably need to right click and mark as executable on the file’s Permissions tab (the dialog you see will look different depending on your flavour of Linux and the file manager app you use):
      Screenshot of the Properties dialog for a file in Linux showing the Permissions tab with the file marked as executable.
      Make sure the “Execute” or “Allow this file to run as a program is ticked.
      After you make the .py file executable, close GIMP, then re-open it. You should find my plugins in the Layers menu.
      Please give that approach a try and let me know how it goes.

  2. Patricia

    Thank you very much ! Merci beaucoup. Very clear explanations, a great help even if the whole process remains a bit complex. In the end, excellent results.

    1. You’re very welcome! I’m glad it’s delivering great results.

  3. Marjan

    Hi. I think that plugin Luminosity masks are not working anymore with new Gimp 3.2. Please can you repair that plugin. Thanks

    1. Hello, thanks for letting me know! I have updated the plug-in to work with GIMP 3.2. Please download the new version and let me know if it works for you.

      1. Marjan

        Dear Sir, it works flawlessly now. Thank you and have a wonderful day.

Leave a Reply

Your email address will not be published. Required fields are marked *