Intermediate Lesson 5:  Cloning

Download:  intclass5dl.zip

Info:  The clone tool can be used for many different things.  In this class we are going to use it to remove some objects from a photo then add a new object from a different photo.

1. Extract intclass5dl.zip which contains the two photos we will be working with, my final results, and an example photo. Open intclass5dl1.jpg, duplicate it, and close the original.  Select the Clone tool and reset to default.  UNCHECK Aligned Mode and change the size to 20.  Using the clone tool is a lot like painting with a pattern.  You right click to tell PSP where to get its sample (pattern) then left click to start painting, there will be a little X in the area you right clicked in and it moves the same distance and direction that you move the mouse as you paint.  Having Aligned mode check will take the sample relative to the point where you first left clicked for each stroke.  In others words say you first left clicked 200 pixels left of where you right clicked then you move your mouse up 50 pixels and left click again PSP will get the sample 50 pixels up from where you originally right clicked.  If Aligned mode is unchecked then PSP will get the sample from the original place you right clicked every time you start a new stroke.

2. First thing we are going to do is remove the dog from behind the horse.  We wouldn't want him to get kicked would we?  Right click behind the dog.  Move your mouse to over the back of the dog just a little up.  Left click and holding down the left mouse button drag up and down from the back of the dog to the front of the dog until the dog is gone then release the mouse button.  Pretty easy huh?  Note:  By not releasing the mouse button you are only doing one stroke so having Aligned checked or unchecked doesn't really matter.

3. Since horses don't eat old tires let's put some grass there instead for him to eat.  Right click around (x:450 y:250).  Move your mouse just under the bottom right side of the tire and holding down the left mouse button remove the tire in the same way you removed the dog.  You may want to zoom in before you start removing the tire so you don't accidentally paint over part of its muzzle.  Tip:  When you get to the left side of the tire you will see the shadowing of the original image start to change because we took a sample from an area that does on have the same shadowing.  To make my painted grass blend in with the existing grass I continued dragging the mouse in a semi diagonal to the left edge of the picture then on down to the bottom.  I then continued holding the left mouse button down dragged up and down to my right until the grass blended in with the existing grass.  When you have the grass painted how you want it then release the left mouse button.

4. So far we have cloned a sample from the same image.  The clone tool will also let you clone objects from a different image.  Open intclass5dl2.jpg and arrange the images where you can see both of them.  Make sure the clone tool is still selected and change Aligned mode to checked.  Right click at the bottom of the horse's muzzle (intclass5dl2).

5. Click the title bar of the photo that had the tire to make it active.  Add a New Raster Layer (Layers || New Raster Layer).  Now left click where you want the horse to be (remember we are starting with the muzzle) holding down the left mouse button paint the outline of the horse (don't worry if you get some area outside of the horse because we are going to fix that).  Note:  In this case you need to watch the X in the image you are copying from as it shows you where you are and what is being painted.  After the outline is done release the left mouse button.  Change your brush size to something bigger to make painting the rest of the horse faster then left click and start filling in the outline.  Remember we have Aligned mode checked so you don't have to do all one stroke like we did the tire and the dog.

6. Now we need to clean up around the edges of the new horse.  There are several ways you can do this in PSP but since we are working with the clone tool we will do it that way.

7. We are not going to erase the mistakes we are going to paint over them using the original image as the sample.  PSP allows you to clone from one layer to another layer.  Change the size of the Clone tool to 10.  Zoom in on your image.

8. Click the Background layer in the layer palette to make it active.  Right click outside the horse where the brush outline is just inside the horse.  Remember where you clicked (note the x,y coordinates).

9. Click on the Raster 1 layer in the layer palette to make it active.  Left click at the same coordinates you right clicked and work your way around the horse.  You don't have to do this in one stroke since we set the relative position already with the first left click.  Remember you are just eliminating the areas outside of the horse that got cloned when you were doing the outline by painting over them with the original image.  You get a perfect blending of the 2 images this way.  It's not hard just can be a bit time consuming.

Notes: One more thing you might want to do is use the clone tool to extend the front legs of the cloned horse to the edge of the photo.  My results were included in the zip file intclass5res.jpg.  There is also a sample.jpg I included that is a picture I made of my children from 3 separate photo graphs of them using the clone tool and some of the other tools we previously covered.