More Fun With Gimp

For those who didn't know, I went on a road trip in California last December. We took many pictures which I still mean to post (this doesn't count!!), so here's one I was just working on (ps my picture to the right on the home page was taken in Death Valley as part of this trip):


The problem was that my friend accidentally covered part of it. This was disappointing because it was the best version available, so here's the procedure I used to fix it.
(click the picture or keep reading to see the fixed version)

Note: This guide was written using Gimp 2.4.6

1) Reset all windows to default using File -> Dialogs -> Create New Dock -> Layers, Channels & Paths.
2) Use the Rectangle Select Tool to select an area of snow to the left of the missing section. The selection should be large enough to cover the missing section and uninteresting enough to avoid obvious repetition. The area on the right closer to me instead of closer to the missing section is ideal.
3) Select "Copy" from the Edit menu.

4) Create a new transparent layer called "snow". Make sure it is layered above the original layer with the picture.
5) Select "Paste" from the Edit menu. This will cause the snow you copied to appear above the "snow" layer as a "Floating Selection".
6) Single-click on the pasted area and drag it over the missing part of the picture so that it completely covers the part you want to replace. Make sure you don't accidentally leave a black border along the very edge by not moving it over enough.
7) Choose "Anchor Layer" from the Layer menu.

8) Create a new mask for the snow layer (Layer -> Mask -> Add Layer Mask). Choose Black with full transparency. The snow from step 6 should disappear because the black layer mask makes it transparent.
9) Click the "Paintbrush Tool", change the paint color to white (click the two arrows to flip the colors), and color in the black region. Do NOT go all the way to the edge.. leave a slight border from the black region.
Note: You are not painting the picture white, you are coloring the layer mask white to allow the snow you pasted to appear though it. If you do not see snow appearing under your brush, make sure you are coloring the correct object by clicking the black layer mask in the layers dialog. Also make sure your brush size is large enough to do the job - choose the largest circle brush and increase the scale under it so that the brush is large enough for the job.

10) Choose the "Circle Fuzzy" brush (brush 19). Make sure the brush is large enough to completely cover the black border from step 9 - it is better if the brush is too large.
11) Run the fuzzy brush directly over the border so the pasted texture blends into the original texture.

12) Click on the pasted image in the layers dialog (not its mask you were just painting).
13) Click "Brightness-Contrast..." from the Colors menu and adjust the Brightness so that the pasted texture appears the same as the textures around it.

Note: If there appears to be a brighter border around the pasted snow and the original picture, it's because you're changing the brightness (and thus transparency) of the layer mask. Make sure you're changing the brightness of the pasted texture and not its mask by clicking on it in the layers dialog before opening the Brightness-Contrast dialog.
Note: These instructions assume you're using the same image as in this post. Obviously how you adjust the contrast or even other settings (hue, etc) depend on the image you're actually working on.

14) When you are satisfied that the levels are sufficient, Right click on the layer and select "Merge Down" (or Layer -> Merge Down). This allows us to do the next step.
Note: The purpose of this next section is to reduce unnecessary repetition in the copied texture. It's mostly guesswork, and you can do as much or as little as you want. You'll probably need to use Undo a lot - try to keep changes natural-looking.
15) Select the "Healing Tool" and choose a large circle appropriately scaled to select a sizable portion of snow you think should be mimicked elsewhere.
16) Select the source texture by left-clicking while holding the Ctrl key. Now choose where to reproduce that texture by clicking on an area of the copied texture.
Note: You can move the brush while "painting" the new texture.

You should have something like this when you're done. I bet a stranger wouldn't even notice it was edited (click the image for a larger view up to 1600x1200):

Website theme and Gimp tutorial (November 12, 2007)

Other website update: I modified the theme for Gallery2 to include a link to embed images in Drupal because it wasn't including the item ID in the URL like it used to, and I didn't feel like doing an SQL query like this. I also worked around an issue that prevented gallery borders from appearing around images on the home page. This makes the site have a more consistent look.