GIMP – How to Make a Background Transparent in GIMP
GIMP (GNU Image Manipulation Program) is a cross-platform image editor available for GNU/Linux, macOS, Windows and for other operating systems too. GIMP can be downloaded from: https://www.gimp.org/. This article explains how to create transparent backgrounds using GIMP, and how to create rounded corners on your images.
Overview for Creating Images with Transparency
A common task for many people who work with digital media, and webmasters especially, is how to give images transparency. Sometimes you may want to make the whole background transparent, or other times just a portion of the image, such as making transparent rounded corners, for example.
However, basically the process is very similar, and the logic is the same even in other programs to GIMP. Essentially you need to give the image an "Alpha Layer". Remember, though, that not all image formats support transparency. You cannot, for example, have a bitmap (.bmp) image with transparency.
So, before we start, know that probably the best image format to use is "PNG" (which stands for Portable Network Graphics), and is a very common format these days (images have a .png extension). GIF files do also support transparency, but not to the same degree as PNG does. Here's a five second overview:
PNG (.png): PNG images are often used for images with logotypes (logos which involve lettering/text), logos and for illustrations without gradients. A typical use is for images with flat colors and harder edges. PNG files can have either single or multiple levels of transparency. This differs from the GIF format.
GIF (.gif): This format has been around longer, and is commonly used for animated images, but there are other formats which accomplish the same thing these days.
JPG (.jpg / jpeg): The JPG/JPEG format is commonly used to store photographs, although it can equally be used for other purposes. However, JPG does not support transparency at all.
The Steps for Creating a Transparent Background in GIMP
a) Create a new image. File -> New
Note that the background color of the image will be the secondary color you have selected in the palette.
b) From the menu, select Layer -> Transparency -> Add Alpha Channel
If you ever find that the option to Add Alpha Channel is grayed out when you're trying to create transparency, then no problem. No need to do anything, as it means an Alpha Channel is already added.
c) Next, simply press the Delete key on your keyboard, or from the menu select Edit -> Clear.
Your image should now appear without a colored background, and should display a checkered pattern.
d) Next you can edit the image to appear as you wish, and adding text or other features.
e) Okay, now you can save/export the image, so File -> Export, and make sure to use the .png extension to save the image. In the process of saving the image, a box of options will appear, and you must select the checkbox next to "Save color values from transparent pixels" - if you don't do this then you won't get the transparency which you're trying to achieve.
f) That's it! You're done! You should now be able to load your image to a website, for example, and see that your transparency has worked.
Steps for Creating Rounded Transparent Corners in GIMP
a) Load your image into GIMP
b) From the menu, choose Select -> Rounded Rectangle. Choose a suitable radius for your corners; somewhere between 15 and 25 is often ideal. When you've done this you should be able to see an outline of the rounded image selected.
c) Now, back to the menu and choose Select -> Invert. It may appear as if nothing happens, but fear not - it has!
d) Now the steps are the same as from the instructions above from step "b" onwards. Please read the steps in those instructions for more explicit information. However, to briefly repeat:
- From the menu, select Layer -> Transparency -> Add Alpha Channel
- Press the Delete key on your keyboard, or from the menu select Edit -> Clear
- Now you can save/export the image, so File -> Export (making sure to use the proper image format - .png is usually ideal - and ensuring the checkbox next to "Save color values from transparent pixels" is selected when the options appear).
- You're finished!
Steps for Creating Other Transparent Areas in GIMP
If you're looking to create a transparent background in GIMP, or transparent rounded corners, then hopefully the steps above will have helped you. However, you may also want to create other types of transparency, such as making jagged edges, or making just a portion of an image transparent.
Nonetheless, there's nothing complicated about creating other shapes or areas of transparency; the steps are essentially identical, but you may just use different tools for selecting the area of transparency. For example, you may want to use the ellipse tool to create a circular area (don't forget to choose Select -> Invert to invert the area being made transparent, if that's what you're trying to do). Or you might want to use the Free Select Tool from the tool options if you want to create an outline around a portion of your image (again remembering to use Select -> Invert if you need to).
Other than that, the steps are all the same as those provided above. To repeat once more (noting that more details are given in the first set of instructions for creating completely transparent backgrounds):
- From the menu, select Layer -> Transparency -> Add Alpha Channel
- Press the Delete key on your keyboard, or from the menu select Edit -> Clear
- File -> Export (making sure to use the proper image format - .png is ideal - and ensuring the "Save color values from transparent pixels" checkbox is selected when the options appear).
- You're finished!
You may also find the video below of interest. There's a small section in it about transparency in GIMP, along with:
- How to cut out an image in GIMP
- How to remove the background / change the background color in GIMP
- How to make the background transparent
YouTube
If you found this article and/or videos useful, you can also find other videos you may like on our YouTube channel.