Title: 3.4 Image editing with GIMP
Course: Certificate in Online Education

Image Editing Introduction

Image Editing (*)

Image editing encompasses the processes of altering images, whether they be digital photographs, traditional analog photographs, or illustrations. Graphic software programs, which can be broadly grouped into vector graphics editors, raster graphics editors, and 3d modelers, are the primary tools with which a user may manipulate, enhance, and transform images.

Basics of image editing

Raster images are stored in a computer in the form of a grid of picture elements, or pixels. These pixels contain the image's color and brightness information. Image editors can change the pixels to enhance the image in many ways. The pixels can be changed as a group, or individually, by the sophisticated algorithms within the image editors.

Image editor features

Listed below are some of the most used capabilities of the better graphic manipulation programs. The list is by no means all inclusive. There are a myriad of choices associated with the application of most of these features.

- Selection

A method of selecting part(s) of an image, thus applying a change selectively without affecting the entire picture. Most graphics programs have several means of accomplishing this, such as a marquee tool, lasso, vector-based pen tools as well as more advanced facilities such as edge detection, masking, alpha compositing, and color and channel-based extraction.

- Layers

Layers are analogous to sheets of transparent acetate (each containing separate elements that make up a combined picture), stacked on top of each other, each capable of being individually positioned, altered and blended with the layers below, without affecting any of the elements on the other layers. This is a fundamental workflow which has become the norm for the majority of programs on the market today, and enables maximum flexibility for the user while maintaining non-destructive editing principles and ease of use.
- Image size alteration

Image editors can resize images in a process often called image scaling, making them larger, or smaller. High image resolution cameras can produce large images which are often reduced in size for Internet use. Image editor programs use a mathematical process called resampling to calculate new pixel values whose spacing is larger or smaller than the original pixel values. Images for Internet use are kept small, say 640 x 480 pixels which would equal 0.3 megapixels.
- Cropping an image

Cropping creates a new image by selecting a desired rectangular portion from the image being cropped. The unwanted part of the image is discarded. Image cropping does not reduce the resolution of the area cropped. Best results are obtained when the original image has a high resolution. A primary reason for cropping is to improve the image composition in the new image.
- Histogram

The histogram plots the number of pixels in the image (vertical axis) with a particular brightness value (horizontal axis). Algorithms in the digital editor allow the user to visually adjust the brightness value of each pixel and to dynamically display the results as adjustments are made. Improvements in picture brightness and contrast can thus be obtained.
Histogram of Sunflower image
- Noise reduction

Image editors may feature a number of algorithms which can add or remove noise in an image. JPEG artifacts can be removed; dust and scratches can be removed and an image can be de-speckled. Noise reduction merely estimates the state of the scene without the noise and is not a substitute for obtaining a "cleaner" image. Excessive noise reduction leads to a loss of detail, and its application is hence subject to a trade-off between the undesirability of the noise itself and that of the reduction artifacts.
- Removal of unwanted elements

Most image editors can be used to remove unwanted branches, etc., using a "clone" tool. Removing these distracting elements draws focus to the subject, improving overall composition.
- Selective color change

Some image editors have color swapping abilities to selectively change the color of specific items in an image, given that the selected items are within a specific color range.
- Image orientation

Image editors are capable of altering an image to be rotated in any direction and to any degree. Mirror images can be created and images can be horizontally flipped or vertically flopped. A small rotation of several degrees is often enough to level the horizon, correct verticality (of a building, for example), or both.

Other image editor features

- Lens correction
- Enhancing images
- Sharpening and softening images
- Selecting and merging of images

(*) Wikipedia: http://en.wikipedia.org/wiki/Image_editing
Text is available under the Creative Commons Attribution-ShareAlike License.

GIMP

GIMP "GNU Image Manipulation Program"

GIMP is a free open source image editing program for such tasks as photo retouching, image composition and image authoring.

As with all software licensed under the GNU GPL, it is completely free to download, use, share with others (distribute), and modify.

GIMP include many capabilities. It can be used as a simple paint program, an expert quality photo retouching program, an online batch processing system, a mass production image renderer, an image format converter, etc.

GIMP is expandable and extensible. It is designed to be augmented with plug-ins and extensions to do just about anything. The advanced scripting interface allows everything from the simplest task to the most complex image manipulation procedures to be easily scripted.

GIMP is written and developed under X11 on UNIX platforms. But basically the same code also runs on MS Windows and Mac OS X.

For the latest information about GIMP and to download the software, please visit the GIMP website (http://docs.gimp.org/). The site also has links to the GIMP User Manual and various GIMP tutorials.

How to Install GIMP

GIMP for Linux

It's very likely your Linux distribution already comes with a GIMP package. It is a preferred method of installing GIMP, as the distribution maintainers take care of all the dependencies and bug fix updates.

Install gimp 2.6.10 in ubuntu 10.04(Lucid)

- Open the terminal and run the following commands
- sudo add-apt-repository ppa:lucid-bleed/ppa
- sudo apt-get update
- sudo apt-get install gimp
- Instructions to install GIMP in other Linux versions are available in http://www.gimp.org/downloads/

GIMP for Windows
- Download GIMP and save it to any location on your computer.
- Run the installer - (gimp-help-2-2.6.11-en-setup.exe) from wherever you saved the download.
- Answer the installer's questions. This is a series of typical installer questions. All of the default selections will work fine.
- Review your selections in this next text box, then click "Install".

When the installation is complete, you'll have the option to launch GIMP for the first time.

Starting GIMP

The screenshot above shows the most basic GIMP user interface.

The Main Toolbox: Contains a set of icon buttons used to select tools. May also contain the foreground and background colors; brush, pattern, and Gradient; and an icon of the active image. Use Edit ? Preferences ? Toolbox to enable, or disable the extra items.

Tool options: Docked below the main Toolbox is a Tool Options dialog, showing options for the currently selected tool (in this case, the Crop tool).

The image window: Each image open in GIMP is displayed in a separate window. Many images can be open at the same time. You need to have at least one image window open. The image window holds the Menu of the main commands of GIMP (File, Edit, Select...), which you can also get by right-clicking on the window.

The Layers, Channels, Paths dock with the Layers Dialog open; note that the “dialogs” in the “dock” are tabs. This dialog window shows the layer structure of the currently active image, and allows it to be manipulated in a variety of ways. It is possible to do a few very basic things without using the Layers dialog, but even moderately sophisticated GIMP users find it indispensable to have the Layers dialog available at all times.

Brushes/Patterns/Gradients: The docked dialog below the layer dialog shows the dialogs (tabs) for managing brushes, patterns and gradients.

Tip for new users

Once you are happy with the layout of GIMP's various dialogue windows, go to the Edit > Preferences menu and under Window Management select 'Save Window Positions Now'. Next time you open GIMP, the windows will be positioned as you saved them. You can also choose to 'Save window positions on exit' so that it will open with however the windows were positioned last time you closed down. To restore the original settings, select 'Reset Saved Window Positions to Default Values'.

Resizing images

Activity 1: Change the Size of an Image (Scale)

(use the image: "children.jpg" available as a resource)

This image is huge and you need to scale it for viewing on a webpage.

1. Start GIMP

2. Open the image "children.jpg" with GIMP: click on File, Open
You might notice that GIMP opens the image at a logical size for viewing. So, if your image is big like the sample image, it will display it zoomed out until it fits. You can tell if GIMP has done this by the percentage number in the title bar. (you can click on the little screenshot to see the full view of the screenshot) Just because it looks right in this "View" doesn't mean anything.

3. Right click on the image, select "Scale Image...". This time, you should get the "Scale Image Dialog".
If you have a desired width, put it in the dialog. If you don't have such a number in mind, put the width of GIMP's default image size, which is 256 pixels.

4. Let GIMP choose the other dimension length for you.
5. Select "Scale"

6. Save the resized image as "children256.jpg"

Saving as JPEG - Quality

When you save a file in JPEG format (extension .jpg, .JPG, or .jpeg.), a dialog is displayed that allows you to set the Quality level, which ranges from 0 to 100. The default quality of 85 usually produces excellent results, but in many cases it is possible to set the quality substantially lower without noticeably degrading the image. You can test the effect of different quality settings by checking Show Preview in image window in the JPEG dialog.

Cropping images

Activity 2: Crop an image

There are many reasons to crop an image; for example, fitting an image to fill a frame, removing a portion of the background to emphasize the subject, etc. The process of cropping an image involves selecting the part of an image that you want to display and deleting the rest.

1. Start GIMP

2. Open the image "children.jpg" with GIMP: click on File, Open

3. To get to the crop tool, you can either push the button on the toolbox or right click on the image and follow the menu <Image> Tools -> Transform Tools -> Crop. This will change the cursor and allow you to click and drag a rectangular shape. The button in the toolbox is the nicest way to get to any of the tools.

You can always click on the approximate upper left corner and drag to the lower right corner. You don't need to worry about being accurate, since you can make a better choice by moving the borders.

4. Click inside the selected rectangular shape.

5. Save the image as "children-crop.jpg"

Other image editing programs

Other image editing programs

Commercial

- ACD See Pro http://www.acdsee.com/
- Adobe Photoshop http://www.photoshop.com/
- Corel Paint Shop Pro http://www.corel.com/servlet/Satellite/us/en/Product/1184951547051#versionTabview=tab1&tabview=tab0
- Microsoft Paint http://windows.microsoft.com/en-US/windows-vista/Paint-tools

Freeware

- Picasa http://picasa.google.com/
- Paint.NET www.paint.net/
- Picnik www.picnik.com/

Free and open source software

- GIMP www.gimp.org/