Archive for the ‘GIMP Basic Series’ Category

Correcting exposure using Layers (Part 5 of 14)

Wednesday, January 5th, 2011
An alternative method of adjusting brightness and contrast is to use Layers in GIMP with an appropriate Layer Mode. This can often yield more pleasing results than the automatic adjustments or the Brightness-Contrast command.
Layers dialog in GIMP

Pict 1: The Layers dialog in GIMP displays the layers in the image file and facilitates the manipulation of the layers.

Yesterday, we used GIMP’s automated adjustment tools to tweak the brightness and contrast of digital photos. We also tried out manual exposure adjustment using the Brightness-Contrast command. Today, we take a look at Layers and use Layer Modes as an alternative way of tweaking brightness and contrast.

Quick intro to Layers

When a digital photo file is opened in GIMP, it is placed in the Background layer. You can see the Background layer in the Layers dialog (see Picture 1). If you do any painting or make any brightness or contrast adjustments to the photo, pixels from the photo itself in the Background layer is altered permanently (unless you use the Undo command).

Layers dialog with duplicated layer

Pict 2: Layers dialog with duplicated layer. The Layer Mode and Opacity slider is at the top.

You can create additional image layers above the Background layer. The commands for manipulating layers can be found in the Layers dialog. The six icons at the bottom of the Layers dialog include commands to create a new layer, and to duplicate or delete a selected layer.

Inside the Layers dialog, click on a layer’s name to select the layer, double-click the name to rename it and toggle the eye icon to the left of the layer name to hide or show the layer’s contents. When a layer is selected, any painting or adjustments will be confined to the pixels in the selected layer.

Layer Modes
Layer duplicated twice using Screen Layer Mode

Pict 3: The screen layer mode lightens the pixels below. Duplicate the layer twice for a stronger lightening effect.

The pixels in different layers interact with each other in different ways – depending on the Layer Mode for each layer. There is a total of 21 different Layer Modes. Select one using the “Mode” dropdown box right at the top of the Layers dialog.

The default mode for a layer is “Normal” – the pixels in the upper layer simply obscure the pixels in the layers below. Below the “Mode” dropdown box is the “Opacity” slider which determines how much of pixels in the layer are visible.

Below, we will use the three most commonly used Layer Modes to darken, brighten or increase the contrast of a photo.

Adjusting brightness/contrast using layers
Enhancing contrast using Contrast Layer Mode

Pict 4: Create a new layer from all the earlier layers and apply Contrast layer mode.

First duplicate the Background layer containing the photo by selecting the Layer > Duplicate Layer command from the main menu. You can also click fourth icon from the left at the bottom of the Layers dialog.

A new duplicated layer containing a duplicate copy of the photo is created above the Background layer. In the Layers dialog, click on the name of the duplicated layer to select it. Now click the “Mode” dropdown box at the top of the Layers dialog to change the Layer Mode of the duplicated layer.

Making overexposed photos darker

To darken overexposed photos that are too bright, set the Layer Mode of the duplicated layer to “Multiply”. The photo is now darkened. If the darkening effect is too strong, reduce the opacity of the duplicated layer by dragging the Opacity slider (just below the “Mode” dropdown box) to the left (see Picture 2 above).

Overexposed photo of a potted plant that is too bright

Pict 5: This photo was shot near the asylum in Saint-Rémy-de-Provence, France; where Vincent van Gogh stayed and convalesced for a year

The overexposed photo has been darkene

Pict 6: The original overexposed photo has been darkened by duplicating the layer and setting its layer mode to "Multiply"

If the darkening effect is not strong enough even with the opacity at 100%, duplicate the duplicated layer. Because this new layer will already have its Layer Mode set to Multiply, it will further darken the photo. As before, if the effect is too strong, lower the opacity of the topmost layer.

Making underexposed photos lighter

To lighten underexposed photos that are too dark, duplicate the background layer containing the photo and set the Layer Mode of the duplicated copy on top to “Screen”. As before, control the intensity of the lightening either by reducing the opacity of the duplicated layer, or by further duplicating the duplicated layer – or a combination of both (see Picture 3 above).

Underexposed photo of red roses

Pict 7: These beautiful roses in the courtyard of Monastère St. Paul-de-Mausole are underexposed and too dark.

Roses have been brightened up

Pict 8: The roses have been brightened up by applying the "Screen" layer mode to the two duplicated layers.

Increasing contrast

If the background layer containing the photo is the only layer in the Layers dialog, duplicate the background layer using the Layer > Duplicate Layer command and set the Layer Mode of the duplicated copy on top to “Overlay”. This will increase the contrast of the photo.

Dull and flat photo of a statue

Pict 9: This photo of a forgotten statue at a corner of the asylum appears dull and flat.

The statue now has more "personality"

Pict 10: An "Overlay" layer mode was used to increase the contrast of the statue.

But if you had earlier already duplicated layers to lighten or darken the original photo, there will be at least two layers in the Layers dialog. In this case, use Layer > New from Visible command in the main menu to create a new layer from the combination of all the layers below (instead of the Layer > Duplicate Layer command which duplicates a single layer).

Set the Layer Mode of the new layer on top to “Overlay” to increase the contrast (see Picture 4 above).

Tomorrow, we’ll look at how to remove unwanted colour casts from photos using GIMP.

Correcting exposure in GIMP (Part 4 of 14)

Tuesday, January 4th, 2011
Use simple adjustments in GIMP to darken or brighten an overexposed or underexposed photo. Beginners with little time to spare can use one-click automated adjustment tools, while those wanting more control can use the Brightness-Contrast command.
Dull underexposed photo of a pot of Oden

Pict 1: This dull underexposed photo of a pot of Oden in Kyoto, Japan is typical of the flat snapshots churned out by many digital cameras.

Brighter and more contrasty photo of the pot of Oden

Pict 2: After applying Colors > Auto > White Balance followed by Color Enhance, the Oden looks almost as delectable as when I ate it.

Yesterday, we used the Perspective and Crop tools in GIMP to correct perspective distortion and to crop a digital photo. Today, we make simple adjustments to darken or brighten a photo.

Modern digital cameras are rather intelligent in working out the right exposure for most snapshots. However, some photos may still end up too dark or bright for your liking. And dialling up the contrast tends to enhance the appearance of most photos.

GIMP has many ways of enhancing the exposure and contrast of a photo. Let’s start with the automated adjustments.

Automatic adjustments
(see Pictures 1 to 3)

Less contrasty photo of the Oden

Pict 3: Using Color Enhance in place of White Balance results in a less aggressive adjustment.

There are six quick one-click automatic adjustments in GIMP. They can be found under Colors > Auto in the main menu. These include: Equalize, White Balance, Color Enhance, Normalize, Stretch Contrast and Stretch HSV.

These commands adjust the brightness and contrast of a photo in different ways. Which command is most suitable depends on the nature of each individual photo.

Since it’s so easy to activate each adjustment, just try them on the photo one at a time to see which command yields the best effect. Press Ctrl-Z or Edit > Undo after each command to undo the previous adjustment before trying out the next adjustment.

From experience, I find White Balance gives the best result. Most of the time, applying White Balance followed immediately by Color Enhance may well be all that’s needed to both remove colour casts in photos and to improve the brightness and contrast at the same time.

If the results of using the White Balance adjustment is too exaggerated and contrasty, use Stretch Contrast as an alternative.

Brightness-Contrast command
(see Pictues 4 to 7)

Brightness-Contrast dialog box in GIMP

Pict 4: Drag the Brightness and Contrast sliders and see the results in the photo.

Sometimes, none of the automatic adjustments work for a photo – or you may prefer more control over how the brightness/contrast is adjusted. In these cases, activate the Colors > Brightness-Contrast command from the main menu.

A dialog box with two sliders appears – the Brightness slider on top and Contrast slider below.

Drag the Brightness slider to the left to darken the photo or drag it to the right to lighten it. Drag the Contrast slider to the left to reduce the contrast and to the right to increase it.

Flat underexposed photo of a car

Pict 5: Retro seems to be fashionable for small cars in Japan now. I snapped this sweet thing in Otsu on an overcast day.

Brighter and more contrasty version of the retro car

Pict 6: Using Brightness:85 and Contrast:75 with the Brightness-Contrast command, the retro car looks more zappy now.

Graphic art special effect on retro car

Pict 7: Using Brightness:100 and maximum Contrast:127 yielded a graphic art effect on the car.

Leave the Preview checkbox checked to see the effect of the adjustments on the photo while dragging the sliders. To compare the photos before and after the adjustments, toggle the checkbox on and off.

Once happy with the adjustments, hit the OK button.

To produce a graphics-art special effect from the photo, push the Contrast slider all the way to the right.

Powerpoint backgrounds
(see Pictures 8 to 10)

Illegible text against a photo background

Pict 8: It is difficult to make out the text against the distracting background.

Many people use photos as backgrounds for their Powerpoint slides. Some end up making the text unreadable. Here’s a tip to avoid that happening.

Darken the photo (by dragging the Brightness slider to the left) when using light-coloured fonts for the text in the slide. Conversely, lighten the photo if the text in the slide uses dark-coloured fonts.

If the photo is still too distracting, use the Brightness-Contrast command with the Contrast setting lowered to beween zero and -50.

Text against a darkened background photo

Pict 9: Light-coloured text is more readable against a darkened photo background.

Text against a lightened background photo

Pict 10: Dark-coloured text is more readable against a lightened photo background.

Tomorrow, we’ll look at some alternative ways of adjusting exposure using Layers and Layer Modes.

Perspective correction and cropping (Part 3 of 14)

Monday, January 3rd, 2011
Paintings on windows suffering from perspective distortion

Pict 1: These beautiful window paintings were on a wall right beside the Papal Palace in Avignon - France. The sides of the paintings taper inwards because of the steep upwards angle from which I snapped the shot.

Correct the distortion in perspective that is common when taking snapshots of tall buildings. Crop a photo to exclude distractions, or to change the composition of the photo.

Yesterday, we got ourselves oriented to the user-interface of GIMP, and tried our hand at straightening a crooked photo. Today we continue with common but simple photo-editing tasks like perspective correction and cropping.

Correcting perspective distortion

When taking photos of a tall building from an oblique angle, or while standing near it, the top of the building tends to taper inwards towards the top (see Picture 1). This distortion is called converging verticals and makes the building look as if it is falling backwards.

Distortion in perspective corrected using GIMP

Pict 2: Distortion in perspective corrected using GIMP

To minimise such distortions, you can either go as far away as possible from the building (unfortunately you usually don’t get such luxury of space) and try to snap the building flat-on, or invest in an expensive camera accessory called a tilt-shift lens.

In GIMP, you can correct such distortions in perspective easily and for free – simply use the Perspective tool (see Picture 2).

Select the Perspective tool from the Toolbox (see Picture 3). In the settings section in the lower half of the Toolbox, select the following options: Corrective (Backward) radio button for Direction, and “Image + Grid” from the dropdown box for Preview.

Pick the Perspective Tool from the Toolbox

Pict 3: Pick the Perspective Tool from the Toolbox

Perspective adjustment grid overlaid on photo

Pict 4: Drag the gridlines until the vertical and horizontal gridlines are aligned with the horizontal and vertical edges in the photo.

Click on the photo. A grid is overlaid onto the photo and a Perspective dialog box appears (ignore it for the moment). Drag the mouse within the grid to distort the gridlines.

Distort the grid until the vertical gridlines are aligned with the sides of the building walls, and the horizontal gridlines are aligned with the horizon and rooflines in the photo (see Picture 4).

Click the Transform button in the dialog box and the distortion is corrected.

Cropping

After using the Rotate or Perspective tool on the photo, empty areas are added around the corners that need to be cropped away. Cropping is also done to remove distractions from the surrounding and fill the frame with the main subject.

Area in photo highlighted for cropping

Pict 5: Highlight the area in the photo to be retained by dragging with the Crop Tool.

It is also done to adjust the aspect ratio say, from 4:3 to 3:2, or to crop a flat landscape-oriented photo into a tall portrait-oriented one. Many times, the photographer may simply want to enhance the composition of the photo by improving on the original framing of the photo.

Select the Crop tool from the Toolbox. Drag a rectangular selection around the area to be retained in the photo (see Picture 5).

A rough selection is good enough because the crop selection can be adjusted easily.

Photo cropped to zero into two of the paintings

Pict 6: The photo was cropped to zero into two of the paintings.

Mouse over the side or corner of the selection and the cursor changes to include arrows that show which direction the selection can be adjusted. Click and drag these adjustment handles to adjust the crop selection inwards or out.

To move the position of the crop selection itself (without altering its size and shape), move the mouse over the centre of the selection and drag it to its new location within the photo.

Once you are happy with the crop selection, press Enter on the keyboard to crop the photo (see Picture 6).

Tomorrow, we’ll look at how to make simple exposure adjustments to darken or brighten an overexposed or underexposed photo.

Straightening a crooked photo using GIMP (Part 2 of 14)

Sunday, January 2nd, 2011
Get oriented to the user interface of GIMP, and get your feet wet with a basic correction like straightening a crooked photo.

Yesterday, we took a peek at some of the things that GIMP can be used to correct or enhance a digital photograph. Today we get our toes wet putting GIMP to work actually doing something simple.

Getting oriented to the interface (see Picture 1)

User interface of GIMP

User interface of GIMP

When you first fire up GIMP, you will see three separate windows on the screen. The centre empty window is the image window where the photo appears when you open a digital photo file.

To the left is the Toolbox which contains icons representing the tools available in GIMP. These tools include those for painting, selecting or moving parts of the photo. Mouse over an icon to display tooltips about which tool is associated with the icon, a brief description of what the tool does, and its keyboard shortcut.

Clicking an icon selects the tool. The relevant settings and options for controlling the selected tool are displayed in the lower half of the Toolbox.

To the right of the image window, there is another panel containing “dialogs” for manipulating image layers, colour channels and Undo History. Each of these dialogs is organised as a tab in the panel and can be displayed by clicking on the tab heading of the dialog.

Opening a photo

Open Image dialog box in GIMP

Open Image dialog box in GIMP

The main menu for GIMP can be found along the top of the image window. To open a photo file, choose the File > Open command from the main menu.

Inside the “Open Image” dialog box (see Picture 2) that pops up, a list of folders is displayed in the “Places” column to the left. Click the relevant folder and the files and subfolders in it are displayed in the centre “Name” column. Double-click a subfolder to further dive into its contents until you get to the photo you want to open.

Clicking a photo file will generate a thumbnail preview to the right. Click the “Okay” button at the bottom to open the photo.

You can have more than one photo open in GIMP at a time. Each photo will appear in its own separate image window.

Straightening a crooked photo

Select the Rotate Tool and adjust the grid overlay

Select the Rotate Tool and adjust the grid overlay

A common reason for discarding photos is when they are crooked because the camera was not held level when the snapshots were taken – the horizons are not horizontal or the buildings are tilted. Here is how to straighten a photo by rotating it in GIMP.

First, click on the Rotate tool icon in the Toolbox (see Picture 3) to select it.

In the lower half of the Toolbox, select the “Corrective (Backward)” radio button for Direction, and select “Image + Grid” from the dropdown box for Preview. These are the settings that I find most intuitive for straightening crooked photos. Set the Clipping to “Crop to result” for GIMP to crop off the corners after the photo has been rotated.

Click on the photo in the image window. A Rotate dialog box appears (ignore it for the moment) while a grid is overlaid onto the photo in the image window. Drag the mouse within the grid to rotate the grid. Rotate the grid until the horizon in the photo is aligned with a horizontal line in the grid. You can also align lampposts or sides of buildings that are supposed to be vertical to the vertical lines of the grid.

Photo of sea with slanted horizon

I took this photo off the beach in Nice, France. The camera was not level and resulted in a slanted horizon.

Straightened photo with horizontal horizon

The photo was straightened using the Rotate Tool in GIMP so that the horizon has become - but of course - horizontal.

Once you are happy with the alignment of the photo to the grid, click the Rotate button in the dialog box and the photo is straightened (see Pictures 4 and 5). Select the Image > Autocrop Image command from the main menu to crop away the empty spaces around the photo.

Tomorrow, we’ll try out the Perspective Tool to correct distortion when snapping photos of tall buildings and the Crop tool for recomposing snapshots.

Free photo editing with GIMP (Part 1 of 14)

Saturday, January 1st, 2011

Touch up and enhance your digital photographs using GIMP – the free photo editor. This is the first of a 14-part series on the basics of using GIMP for the absolute beginner.

Photo of dog ornament with strong blue cast

Picture 1: This photo of a dog ornament in a flower pot was taken in Tsumago in Japan. A wrong white balance setting in the camera resulted in a strong blue cast

Today is the first day of 2011. What better way to start a New Year than to pick up a new skill – like using a free photo-editor to edit your digital photographs?

Wow your friends when you next show them your vacation photos by enhancing your snapshots with a photo editor on the computer.

Digital cameras nowadays produce pretty decent photos even for a novice photographer. But a few fast and easy tweaks in a photo editor on a computer can make them look as if they were taken by a pro.

Photo of dog ornament with dull colours

Picture 2: GIMP can be used to remove the blue cast in the original photo. However, the colours remain dull and uninspiring.

Does your spouse look like a visitor from Pluto in those snapshots? Use the photo editor to remove that awful blue colour cast in the photo (see Pictures 1 and 2).

Do those vacation photos look dull and flat because they were taken on an overcast day? Make those snapshots pop by intensifying the colours and increasing contrast with a few clicks of the mouse (see Picture 3).

Free photo editors

Beautifying or correcting your digital photos does not need to cost you an arm and a leg. There is a plethora of free but capable photo editors available on the Internet.

Photo of dog ornament with enhanced colour and contrast

Picture 3: The colour and contrast of the photo has been enhanced to make it "pop".

www.picnik.com is an online photo editor while Google’s Picasa is a desktop based editor that comes with an image browser. Both of these enable simple tweaks and addition of special effects to digital photos through easy-to-use interfaces.

GIMP is my favourite recommendation to those who want more powerful photo editing features but is reluctant to dish out the moolah for the industry standard Photoshop CS5 (S$1091).

Over the next two weeks, I will be posting a short how-to each day on the basics of using GIMP – a free photo editing software that you can download from the Web.

What is GIMP?

The name GIMP is an acronym for “GNU Image Manipulation Program”. It is a free desktop-based photo-editor with features and interfaces similar (but not identical) to Photoshop. It runs on Windows XP SP2 or newer, Mac OS X and Linux. Go to www.gimp.org/downloads and follow the links to the relevant installers for different operating systems.

Tightly cropped final photo of dog ornament

Picture 4: The photo was tightly cropped around the dog ornament to make it fill the frame.

Using GIMP, you can do simple tasks like straightening a crooked photo, or cropping out distractions in the background to fill the frame with the main subject (see Pictures 4).

Powerful tools, like Levels and Curves, enable fine control of exactly which part of a photo to tweak for colour and contrast adjustments.

For advanced adjustments and compositing, a few photos or different parts of the a single photo can be put on separate layers and manipulated independently of each other.

Tomorrow, we’ll get ourselves orientated to GIMP’s interface, and set it to work straightening a crooked photo.