Adding a Transparent Background Using GIMP
by lunjesse in Craft > Digital Graphics
9247 Views, 56 Favorites, 0 Comments
Adding a Transparent Background Using GIMP
While making an object's background transparent is easy for solid colors, in most cases, the background tends to have other details that make this troublesome. This guide uses GIMP to add transparency using the free-select tool.
Making a New Layer
This guide assumes you should have already installed GIMP.
- Start the program, and paste the image onto the canvas. Alternately, open the image in GIMP.
- Under "Layers", select "New Layer...". If you never changed the shortcut key settings, you can also use "Control+Shift+N" to open up the New Layer popup.
- Click on the "Transparency" option. Do not change anything else. Click "OK."
- Under "Windows" at the top, go to "Dockable Dialogs" click on "Layers".
- The window as shown in picture 5 should appear.
Free Select Tool and Options
Now with the layers all set up, you need to be able to select the object.
- Under Windows, click "New Toolbox". This may also display as "Toolbox"; regardless, it should be fine as long as the next window shows up.
- Click on the grey lasso shown in the picture.
- Alternatively, you can also find the tool under "Tools ->Selection Tools ->Free Select"; the toolbox is simply for the convenience of using other tools if needed.
- Under "Windows->Dockable Dialogs" select "Tool Options"
- Make sure "Antialiasing" is checked, and Feather edges are unchecked; the latter is not needed for solid/straight edges.
Selecting the Object
Now with everything set up, it is time to select an object. In this example, the slippers will be used.
- Go back to the layers window. Make sure the main picture layer is selected, and not the blank one.
- Click on the edge of the object to be selected. In this case the edge of the slippers. Any spot works, as long as it's the edge.
- To make it easier, you can also hold the control button and scroll the middle mouse up to zoom in. Scroll down while holding control to zoom out.
- Make a rough outline around the object's edge. While it does not have to be 100% precise, care must be taken to avoid cutting off too much. This is basically like "connect the dots" except the dots are imaginary. Do not try to make it with a couple dots; this leads to large parts of the image cut off.
- A visualization can be found here. An embbed encode:
- Or copy the following link to the address bar: v=iShfy4VK3Ik
- Once you reach back to the first dot, click on it. The selection should look something like the picture.
- Cut the object out with control+x. The option can also be found under "Edit". Click back on the blank layer in the "Layers" window.
- Paste the image using control+v. Once again, the option can be found under "Edit". While it may appear nothing has changed, the Layer window would appear like the picture shown.
Final Touches
Now the next step all depends on what background you want. For example if you want a transparent background for a webpage, regardless of the page's background:
- Right click on the main image on the layer window, and select "Delete layer".
- The slipper should look like it's surrounded by a checkered background. This is normal. Go to "Image" and select "Autocrop Image"
- Under "File", select "Export As..."
- Make the name to whatever you want, as long as it ends in ".png". Do not export as "JPEG", since transparency is not supported. Click export using the settings shown.
In the case you want to paste it on something else, the first step can be modified to simply press "delete" on the keyboard with the main image selected. This will cause the layer to be blanked, but the object remains. Simply paste another background on it, and it should appear under the object.
Examples
Now go have fun making youtube preview thumbnails using actual game footage instead of copying wikis. ;)
But seriously, this can be applied to many different things, as shown on the youtube link in step 3. Feel free to try it on other objects.