Healing & cloning tools

Most of the modification we've done to images throughout these pages has been through the use of selections, masks, or basic transforms such as translaltion, rotation, and scaling of those selections. But most image editing software will have tools specficially for quick edits of small, non-uniform,

Keep in might that use of these tools is almost always a form of destructive editing. If you are about to make a significant change to an image consider duplicating the layer (or keep a separate file) so that you can retain an original version.

The Clone Stamp Tool

Any decent image editing software will make use of a "Clone Stamp" tool. This is basically a tool for copying one part of an image to another part of an image that works in two phases.

  1. Mark a location on a canvas to copy pixels FROM a position.
  2. Use the tool to draw pixels TO a position.

This kind of tool in useful for several reasons.

  • To outright duplicate solitary elements.
  • To extend a pattern or repeating image to be larger than it normally is.
  • To cover up small imperfections such as scratches or blemishes.

Let's look at an example.

This image of some candied chocolate is good. But it's not great. This is not nearly enough chocolate!

Let's duplicate a few of them a few times. In this case since we want the entire object (each chocolate) we'll use a clone brush where the size of the brush is slightly larger than each candy. That way we can copy the candy with only a short depression of the mouse button.

Examine the next image with the duplicated candy. See if you can spot a few imperfections or concerns with the duplicated pieces.

For the most part each of the new pieces looks "ok". It can, and should be, a concern that some of the candies look exactly alike. Such obvious copies are an obvious indication of Photoshop trickery. That problem *might* be allieviated through use of distortion or adjustment layers to slightly chang the color / lighting of the duplicate. But this depends entirely on the image.

What you should be noticing is the larger problem of the two duplicates to the lower right - specifically the green and brown candy pieces. These two pieces more than any other show evidence of image fakery. Can you see the problems?

The right-most brown candy should be the most obvious because it has a very obvious "ring" around it where not only the candy from the left side of the image was copied but the wood around the candy was copied as well. In this case the wood could have been integrated into the surrounding area but because the brush used during the copying operation had a hard falloff we get a very solid, and noticeable, ring of embarassment around the candy.

The green candy just below that has a similar problem. In this case the candy has, again, taken the wood around the original candy (at the top) along with the candy itself. In this case the brush used during the copying at least had a soft falloff and therefore was able to blend the wood of the copied image a bit better. This particular instance of duplication still fails however. The wood that was copied is of an entirely different shade than the wood around the area it was copied too. This difference of color is noticeable and, with close examination, would easily mark the second green candy as a copy.

In both cases these particular problems could have been alleviated by making sure only the candy itself was copied but that is not always possbile. Objects with soft edges like fur or hair, or objects that are partially transulcent, can't help but take some of their background with them when copied. In those cases both of the problems above may still apply and should be avoided when possible.

Healing functions

Depending on the program "healing" operations typically refer to the removal of unwanted artifacts. Just like the clone stamp tool these tools are used to remove scratches, blemishes, or small details that are uwnanted. Unlike the Clone Stamp Tool a "healing" operation uses extra calculations to do more than just copy pixels form point A to point B. They typically arrange the copied pixels in a more "correct" or "smart" way.

They are very specific to each program however, so we'll discuss them in the program pages.

Element Distortion

Sometimes you will encounter a situation in which you will need to distort an element by pushing, pulling, or scaling individual sections of an image separately from the rest of the iamge.

There are two primary situations in which you'll want to do this.

  • To modify the proportions of an element (for instance the proportions of a model for a magazine cover).
  • To get one element to fit correctly within a scene. For instance when you want to swap the heads of two friends in a picture as a joke and need to modify the width of their necks to match the shirt size.

Unfortunately this is not a widespread feature among image editing software. Adobe Photoshop & Corel PaintShop are the two most popular packages that are capable of such corrections.

It also can be used just for making things awesomer.

Further examples of what distortion might be useful for...

  • For making *subtle* changes to expression. This is something you have to be careful with. As you can see in the image of batman above changing an image in a significant way can result in "streaking" pixels. Look particularly around the edges of the mouth. While the direction of the mouth has changed you can not change the lighting within the scene. As such the lighting of the skin has not changed to reflect what appears to be the new curvature of the surface.
  • For modifying body types. You've seen photoshopped models on the covers of magazines. This is part of that process. A simple push and a pull here and there can pull in the sides of a person's body fairly easily (but again, won't change the lighting within the scene).
  • Faking perspective. This is probably better done with the "Free Transform" function in a program like PHotoshop but is also possible with a good distortion tool. Typically this will work best with flat surfaces / object and just involves making one end smaller than the other.
  • Combining animals to form weird mad scientist animal hybrids (expanding or contracting the torso of one to match the torso of another). I don't know if this has a practical application. Does it matter?

Modifying an element within a single picture

Sometimes the modification you want to do involves changing an object in some way but *not* the background that it resides in. This is obviously difficult when you are working with a single image, as opposed to the separate images we've used in previous examples, since you can't see the background behind the object.

In this case we are talking specifically about changing the shape of an object within an iamge.

Generally the steps involved in such a modification would

  1. Duplicate the image into at least two layers.
  2. Make the desired changes to the object to be modified without regard to how the background is modified / damaged.
  3. Isolate the modified object to let the original image through masking.
  4. Use various transforms and cloning / healing tools to extend the background to "fill in" the areas left by the modification of the object.

Obviously this is just one situation where a single image is acceptable. There are others but keep in mind they will share one quality you can see here - that of an easily modifiable background. The more complex the background, the more time consuming the modification will be.

Blending multiple elements into one

The tools and techniques used to merge to elements are not going to be that different than combining foreground / background objects. All the same properties considered before must still be paid attention to but we must now add at least one more consideration.

  • Perspective
  • Light direction / quality
  • Surface color / texture.

From there things start to branch out depending on your program. For all programs it will require use of the clone stamp tool but some, like Photoshop, will have healing tools which can help with the process.

Let's look at at least one technique possible not only in Photoshop but in Paint.Net and GIMP as well.

Non-destructive clone stamp tool use

It's not immediately apparent when you first learn how to use the clone stamp tool in a paint program but it IS in fact possible to copy pixels from one layer to another. This is something we can use to maintain a non-destructive approach to image editing.

It's as simple as this.

  1. Create a new, blank layer in your image editor.
  2. Select the layer you want to copy pixels FROM in the layer browser of your chosen program.
  3. With the clone stamp tool selected define a source point on the layer to copy pixels from ("Alt-Left Click" in Adobe Photoshop, "Ctrl-Left Click" in Paint.Net and GIMP).
  4. Select the layer you want to copy pixels TO in the layer browser.
  5. Draw the copied pixels as normal.

With the copied pixels being drawn to the blank layer instead of the original you are free to revert any of the changes as you please!