So far we have made a roughly cut-out version of our daffodil flower floating on a transparent background. If you zoom in to the edges of the petals, what I mean by rough-cut becomes all too apparent – this mosaic like effect, with occasional bits of background and a few bits of petal missing can now be ‘healed’ by working on the transparency mask that we set up in the last part of this tutorial.
The route that we take is as follows:-
- Introduce a contrasting backdrop so that we can clearly see what needs fixing.
- Select the greyscale mask on which to work our magic.
- Carefully paint around the edges with a soft edged brush using the background and foreground colours (set at black and white respectively).
- Apply the finished mask to our image.
- Tidy up and save the completed clip in a format that we can use later for decoration in another program, or for a photomanipulation project.
Adding a Contrasting Backdrop
As we already have a vacant layer called ‘New Layer’, we can simply select this in the layer menu and, using the arrows below it, push it down to the bottom of the stack. If, for some reason, you do not have an empty layer, create one by clicking on the first icon at the bottom of the layer box (a page with a star on it), and move this to the bottom of the stack using the down arrow in the layer box.
With the empty (bottom layer) selected, go back to the toolbox on the left and select the bucket fill tool again. Click on the foreground colour box and pick a mid-tone green.
Use the bucket tool to fill this layer with green by selecting the blank layer (from the Layer box) and then clicking on the image. You should now be looking at something like this:-
Now select the layer mask (the black and white daffodil-shaped icon) in the Layer menu and zoom in to look at the damage that we need to repair.
You will immediately notice the jagged edges that are a result of the mask giving us only opaque or transparent. We now need to remedy this by painting a few shades of grey on the boundaries.
Select the brush tool and pick the brush called ‘circle fuzzy (76)’ (see above on LHS).
Move the slider control under the brush selector until you have a suitably small brush that covers a few pixels at a time. I set mine to 0.18 as can be seen here:-
As we have the mask selected (make certain of this – otherwise you will be painting our daff in black and white stripes), we can use this ‘soft’ brush to paint gently around the edges and to blend them so that they no longer look like a mosaic. The brush paints in whatever is set as the foreground colour, which is currently black, so it works as an eraser; change the foreground colour to white by clicking on the arrow between the ‘foreground colour’ box and the ‘background colour’ box and we have a paintbrush with a soft edge. Paint around the edges, alternating between black and white, to smooth the edges of the flower against the background. This took me about 30 minutes when I did it, so bring a packed lunch!!
Although this is possible using a mouse, it is made so much easier using a graphics tablet, which will cost you anything from £50 to £2000, depending on how serious you intend to be at this game. I recommend using a Wacom Bamboo as a starter which runs fine on Linux, and has supplied drivers for Mac OS and Windows, and will set you back about £50. I will do an article on these at a later date if there is a demand.
When you are happy with your blending, and there are no ugly ‘steps’ on the edges of the flower, save your work as an xcf file. This is a point of no return, so saving is all important if you ever need to go back and alter the boundary.
Finishing the Clip
You should now have a beautiful image of the daffodil showing on a green background with no signs of the blurry image background, no holes, no stepped mosaic effects and nothing missing. If this is not the case, zoom back in, repair it using the black and white brush combination and save again as an xcf.
Now that we have done, select the green background in the layer box, and delete it by clicking on the red circle with a black cross at the bottom of the layer box.
You should now only have one layer left, so select this in the Layer box, right click on it and Apply layer mask. This will get rid of the rectangle on the right, but preserve the transparency on the image.
We have a lot of unused space around our daff, so select Image > Autocrop Image to get rid of this.
Now that we have everything perfect, select File > Save As > filename.png where the filename is whatever you want, but you must use a png extension, as this supports the transparency that you have just spent the last 6 hours creating!
Well done! You have now saved your daffodil which should now look something like this:-
I hope that you have found this tutorial useful, and I hope that you will also try out clipping from your own photos and sending them to me for other PomPrint bloggers to use. If you have any comments, or points that need clarification, please let me know.
If there is a demand. I will move on to the subject of how to use these clips in photomanipulations using Gimp.
This work by PomPrint Designs is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Permissions beyond the scope of this license may be available at http://www.pomprint.co.uk.