Create a Clipping Mask in GIMP

How to Create a Clipping Mask in GIMP?

Have you noticed pictures or posters on the internet where several images are layered together? Do you know what the process is? Perhaps, you know you can use clipping mask to create such layered pictures.

There is good news for you if you are a GIMP or the GNU Image Manipulation Program user. You can now create a clipping mask in GIMP. However, it was not possible to perform clipping mask GIMP in the earlier versions.

Thankfully, now you can add clipping mask to layer groups in GIMP 2.10 or newer versions. Since it was not available earlier, many people were unaware of creating a clipping mask in GIMP.  

This article will help you learn how to perform this task in GIMP to edit images. But, before that, let’s know why clipping mask is a useful feature for editing images in GIMP.

Is Clipping Mask Such a Useful Feature?

Simply put, a clipping mask is a way to control the visibility of a layer. It comes in handy when a layer mask is applied to a group of layers. This is because each layer denotes a different part of the image.

However, every image used for editing contains different objects and shapes, such as; text, objects, frames, etc. Therefore, in the clipping mask, all these image parts are divided into layers.

The clipping mask helps to combine two or more layers for a better visual outlook. It may sound not very easy but creating a clipping mask is relatively more straightforward. The following is an example of a clipping mask to better understand.

Let’s say you want to apply a layer mask into two photos so they can fade into one another. But, then, you like to keep these photos inside a specific shape. It means you need another layer mask, and it applies to both of them.

In total, you need three-layer masks where a layer mask for each layer. Then, a group layer mask is essential to clip both photos to create a particular shaped frame.

How to Create a Clipping Mask in GIMP

What is Masking in GIMP?

Masking is a technique to make a particular portion of an image visible while making other parts invisible. In GIMP and Adobe Photoshop, they use it. In addition, both GIMP and Photoshop utilize layer-based methods for editing images.

The masking technique is used mainly by graphic designers, web designers, photographers, etc. Using masks allows preserving a specific part of the image while changing the rest of the picture.

On a mask, the white area remains visible, whereas the black part remains hidden. The portion in line with the black site remains hidden. On that layer, the bottom part will be visible.  

How to Create Clipping Mask GIMP?

GIMP is used as an open-source and non-cost alternative to Photoshop. It has been around for years. Now the new versions of GIMP are available for Windows, Linux, Mac, etc. It works more like Photoshop with an extended range of toolset.

As mentioned, creating a clipping mask is easier in GIMP. You can make an image outstanding by simply clicking it in five steps. Below we describe the process to create a clipping mask in GIMP. Here we go!

Step-1: Generate a New Document and Import Photos

First of all, take your cursor to the File section and select New to create a new document for your work. Then, you’ll find a window with the name “create a new image.”

There is an option to choose image size (width x height). Here we’ll select 2000 x 1280 dimensions as we’ll be combining two photos with 1920 x 1280 dimensions. Next, there are advanced options to choose different settings.

Put on the following values in the advance settings and click OK to proceed.

  • X resolution – 72
  • Y resolution – 72
  • Colour space – RGB colour
  • Precision – 32-bit floating-point
  • Gamma – Linear light
  • Colour profile – Built-in RGB
  • Fill with – Background colour

Now you have a new composition created with the above settings. The next task is to open the photos that you’ll be using for the clipping mask. Here we’ll use two photos – one photo of a man and one of the women. We’ve chosen the images from here. There are more photos you can choose for your composition.

Download any two photos to your computer. Now open both images as layers by clicking File -> Open as Layers into your composition. Choose the first photo and click “Open,” and import the second photo in the same way.

Now, you’ve three layers in total in your composition. You can see what you’ve chosen in the layers panel. Here, we kept the women’s photo as a top layer and then the man’s photo in the next layer. Finally, the background layer is sitting at the bottom.

 Step-2: Create a New Layer Group

There is an option to create a new layer group at the bottom of the Layers panel. Hit the “create a new layer group” icon to generate a new layer group folder. The generated folder will be named “Layer Group.”

You can change the name with a double click on the title. Then press the enter key on your keyboard. Now the new layer group folder is generated. Next, drag the photo layers into the folder.

At this point, you can still change the stacking order of photo layers up or down. Click and drag the photo layers to change the position of the coating. Also, you can use the Raise or Lower icons at the bottom of the panel.

How to Create a Clipping Mask in GIMP

Step-3: Include the Clipping Mask

Thus far, you’ve inserted the photo layers in place inside the group. Next, you can attach a layer mask to the layer group. This allows adding a layer mask to all photo layers inside the layer group.

Now, it’s time to add a clipping mask. Before that, make sure the mask covers the whole area of your composition. The width of the composition is larger than the width of the photos. So, the mask may get cut off by the photo layers’ boundaries.

To make sure it doesn’t get cut off, extend the width of the photo layers. To do so, go to the “Layer” option and then “Layer to Image Size.” Doing this will make the boundary of the entire layer group, including the active layer and the size of the composition boundary. Next, repeat the same process with the man photo layer. Thus, the layer boundaries will be the same as the size of the entire composition.

Note: A light blue dashed line defines layer group boundary. A black and yellow dashed line represents the layer boundaries.

What’s next? Now the time is to choose a particular shape of the layer mask. Here we’ll be using an ellipse shape. There is an “Ellipse Select Tool” on the left-hand side above. Grab the tool and draw an ellipse around the area you want to mask out.

To do so, drag the mouse from the left corner down to the bottom right of the composition. It makes an ellipse across the whole composition. Now click on the “Layer Group” tab and select “Add layer mask.”

In the Add Layer Mask window, choose “Selection” under the “Initialize Layer Mask to” section. Then, click on the “Add” button. A layer mask will be added in shape on an ellipse to the layer group.

This reveals the background outside the ellipse area. If you want to deselect the ellipse selection area, hold “ctrl+shift+a” on your keyboard.  

Step-4: Assemble the Photos and Add Layer Masks

So, your clipping mask has been placed. Here you can only see the photo at the top. The images in the layer below are covered up. Now, it’s time to set the photo layers properly.

Start with the top photo player in the layer group. Click on the women’s photo and drag the image by grabbing the move tool. Next, pull the picture to the left. Then, right-click on the women’s photo layer and select “Add layer mask.”

You’ll again get an Add Layer Mask window. Choose white under the “Initialize Layer Mask to” section and click on the “Add” button. If you want to make it looks like “the top photo is fading into the layers below,” do the following.

Add a gradient to the layer mask where the gradient will be faded from black to white. Here the white denotes full opacity, and black indicates transparency on a layer mask.

Now, grab the Gradient Tool from the Toolbox. Make sure the background and foreground colours are black and white. The gradient is set on FG to BG (RGB) by default. You can make changes by clicking on the colour box at the top left corner.

The shape of the layer is set to “Linear.” Before you drag the gradient, make sure you have clicked on the layer mask. Now, click and drag the gradient from left to right.

Make sure you’ve started right after the women’s face and ended at the layer boundary. You can hold the ‘ctrl button to drag the gradient in “straight-line mode.” It ensures your gradient is straight.

If the color goes the wrong way, you can correct it by clicking the “Reverse” button. You’ll find the “Reverse” button in the gradient tool options. Once your gradient is placed correctly, click the enter key on your keyboard.

The next task is to move the man photo layer. Simply click on the move tool and drag it to the right. Move it until you get the desired result. However, you can redraw the gradient anytime until you are satisfied. Simply use the move tool to do so.

Step-5: Export the Composition

After you’ve arranged the two photos, you can keep the background white. Also, you can hide the background layer if you want. We suggest using a transparent background. Now your photo is ready to export as a JPEG or PNG.

Go to the File tab and select Export to export the photo. Here you can rename the composition at the top of the window. Now choose the location where you want to save the composition.

At the bottom, there is an option to choose the file type. You can export the File as JPEG, HTML, ico, png, and more styles. Choose the type you want and then click on “Export.”

Note: To export the File as JPEG, select the image quality at 100 if you want to print it. Or, choose it between 60 and 70 if you’re going to upload it on a website. Then again, keep all the default settings if you want to export it as a PNG file.

Final Words

See! It is as simple as that. We hope that our guide helps you create a clipping mask GIMP. We tried to explain every step as simple as possible. Once you’ve mastered the steps above, you can easily mask any image. So, create your unique pictures or posters from now on. Best of luck!

Leave a Comment

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