Tuesday, 24 June 2014

merging images

Here are two simple images I wish to merge.
A skull & crossbones with a purple headscarf ;
and a hat;
The goal is to put the hat on the skull and have everything look natural.

Start Gimp. Open the hat picture by dragging and dropping it into Gimp.The hat picture is slightly bigger than the skull and crossbones, so we open it first.
Next, add an alpha channel.
     [Layer | Transparency | add alpha channel]
Next, add the skull and crossbones by dragging and dropping it into Gimp. It will add it as another layer. It will look like this;

Now, reverse the layer order and make the hat the active layer.
     [Layer | Stack | Reverse layer order]
or
     [Layer | Stack | Layer to bottom]
The result is the hat will be on top, blocking out the skull. The skull however, is still the active layer and we want the hat to be the active layer. Make the hat layer active.
     [Layer | Stack | Select top layer ]
We now want to make the white background of the hat transparent. To do this we select the white area and erase it. We an select the area by color or by fuzzy select.
     [Tools | Selection tools | By Color select ]
or
     [Tools | Selection tools | Fuzzy Select ]
Right click in the white area and from the drop down menu select;
     [Edit | Clear]
The result will look like this;

Now, use the move tool to move the hat layer up so the hat fits on the skull. 
The grey checkerboard is part of the transparent part of the hat layer. The white is the non transparent part of the skull layer.
Next, we will merge the layers and export our new graphic as a png.
Merge layers;
     [Layer | Merge Down]
Export png.
     [File | Export]
In the box that comes up, in the Name field give your new image a name. Ending it with .png will export it as a png file. [if you end the file with .gif, .jpg, .bmp it will export it as that type of file.]  In the png popup, accept the defaults and export. When you close gimp it will tell you that your file hasn't been saved. Gimps own default format  is .xcf. You can save a .xcf version if you plan on doing further work with the file, but otherwise its not needed. That is it!

Here is the result;


No comments:

Post a Comment