You Can Add A Hat To A Picture, Image or Avatar
A Santa Hat for Christmas, a Leprechaun's hat for St. Patrick's Day, or a baseball cap for baseball season, if you can find an image of a hat, chances are you can add it to your picture using GIMP, the free graphic image manipulation program.
Getting Started
First you need to choose an image, I'm going to use Wilber, GIMP's mascot:

Then you need a suitable hat graphic. I found mine at Clker.com, they have a large assortment of royalty free and public domain clip art. I like that their images are mostly in the Portable Networks Graphics (png), and Scalable Vector Graphics (svg) formats, which are easier to work with than jpeg and gif formats when trying to merge multiple images.
I'm using png here, but that will still work well, and even if I had saved the svg version, GIMP is not be able to save the finished file in that format.

Another thing I like about images from Clker.com is that they are usually larger than the other free clip art sites. The Santas Cap I found is larger than the image of Wilber I have.
It's always better to make a large image smaller than to try to enlarge a small image, here's the dimensions as shown on the top of each Main Image Window:

The easiest way I've found to do this is to make a new canvas to work on. For this job, I'm going to create a new canvas based on the hat because it is the larger of the two pictures.
If the picture I wanted to add the hat to was the larger one, and didn't have enough space to fit the whole hat, then I would just make a canvas that was larger than the base image, and resize the picture or crop it after I finish, if it is too big.
To make a new canvas based on an existing picture, click "File" on the Toolbar, and select "New...":

Which brings up the Create a New Image dialog box ready to set the new image with the same size dimensions as the originating Image Window.


Adding Elements to the New Canvas
I'm going to start by adding the whole picture of Wilber. I copy it from its window:

Paste it to the new canvas:

Select the Move Tool from the Toolbox, which should be floating to the left of your Image Windows:

When the pasted image is where I want it, I set it in place. Either move the cursor on the canvas until I see a little anchor symbol, then click the picture, or click "Layer" on the Toolbar, then select "Anchor":

At this point I want to match the color of the canvas background with the color brought over from the image of Wilber.
In the Toolbox, I select the Color Picker Tool:

I just click on the color I want to pick, and in this case, I'm set up to select a foreground color. That changes the color shown in the foreground Color Indicator box. I'm doing this quick, so it really does not matter to me which is the foreground or background at this point:

I go back to the Toolbox and select the Bucket Fill Tool which is set by default to fill using the color shown as a foreground color in the Color Indicator:

Click anywhere on the canvas background and fill it with the same color I have chosen using the Color Picker:

Now I copy and paste the Santas Cap onto the new canvas creating a new layer:

Obviously, it is too big, so I click on "Layer" on the Toolbar, then select "Scale Layer...":

Which brings up the Scale Layer dialog box:

Between the two dimensions, there is a chain link icon. When it is linked, the width and height will change at the stay time and keep the same perspective. If you need to change one, but not the other, click on the chain to break the link.
Unfortunately, you do not see the layer change size as you change the numbers, so it is kind of trial and error until you get the size that looks best to you.
I get the size I like, and switch to the Move Tool again. I move the hat in place, and you can see the square outline of the original picture, but not the checker board background.

That background is the transparent Alpha Channel, and is the reason you want to use a png or svg image. Jpeg and gif images do not have an Alpha Channel, if you can only use them when doing a job like this, you would need to remove the background yourself using GIMP.
Now I've decided that the hat looks backwards, so I go to the Toolbox and select the Flip Tool:

Click on the Santa Cap, which flips the layer

It's not quite right, so I switch back to the Move Tool, and move it up:

It's still not right, so I go back to the Toolbox and select the Rotate Tool:

Click on the layer I want to rotate, and the Rotate Dialog box opens:

With the Rotate Tool, it looks a little confusing with all the different numbers, but with the slider bar, you can see the layer move as you adjust the bar. It is real easy to do this one just by looking at it.
Hat Added - The Final Picture
You may have to move it again, or adjust the rotation until you get it looking the way you want, then anchor the layer in place.

- GIMP - The GNU Image Manipulation Program
- News - Screenshots - Features - Downloads - Documentation
- Get Involved - Plug-in Registry - GIMP Development
GIMP is the GNU Image Manipulation Program. It is a
freely distributed piece of software for such tasks as photo
retouching, image composition and image authoring. It works
on many operating systems, in many languages.
Check Out More Great GIMP Tips
-
GIMP Tips Tricks & Tutorials
-
For a free program, GIMP sure delivers on features, functions, and just all around usefulness. It may seem like learning another language at first, but once you start working with it, it gets easier to understand things. I find it is easier to expla...
Comments? What Do You Think About Adding A Hat To A Picture Using GIMP?
-
Reply
- praise praise Dec 15, 2009 @ 7:28 am
- That is so cool, thanks! 5*
Enjoy This Lens About Using GIMP To Add A Hat To A Picture?
About CleanerLife
I'm obsessed with eating healthy, fresh food raised or grown as local as possible, reducing pollution, increasing recycling, and using natural products in and around the home.
Lensmaster CleanerLife has been a member since July 16 2008, has rated 3,007 lenses, favorited 762, and has created 101 lenses from scratch. Dan Boutilier donates their royalties to Soldiers Angels. This member's top-ranked page is "Old Fashioned Christmas". See all my lenses
CleanerLife On Twitter

- CleanerLife
- aka CleanerLife
- 1,305 followers
- 1,459 following
-
- Classic Rock Christmas Celebration! http://my-tunes.crabbysbeach.com/blogs/classic-rock-christmas-celebration/
-
- @CCGAL if you have a few minutes, could you look at my new site and let me know what you think? http://www.nrics.com/
-
- @CCGAL yeah, that also tells me who not to follow in the first place! :)
-
- @badmsm I tried to get a picture of me shoveling at the end of the Blizzard while wearing your hat, but it didn't come out good :(
-
- #Squidoo Success? #8 on Google & #1 on Yahoo for "old fashioned christmas" - http://www.squidoo.com/old-fashioned
CleanerLife's Top 10
Fetching RSS feed... please stand by
GIMP © The GIMP Team
Original content:

How To Add A Hat
To A Picture Using GIMP
by CleanerLife
is licensed under a Creative Commons
Attribution-Noncommercial-No Derivative Works 3.0
United States License.
















