1 Name: _____________________________ Class: ______________________ ( ) Contents 1. Image Processing Basics ....................................................................................................... 2 1.1. Raster Graphics and Vector Graphics ...................................................................... 2 1.2. Raster Image Formats ................................................................................................ 2 1.3. Basic Properties of Raster Images ............................................................................ 3 1.4. Common Features of Image Editing Software ......................................................... 5 2. Introduction to GIMP ............................................................................................................ 6 2.1. Introduction ................................................................................................................ 6 2.2. GIMP Interface ............................................................................................................ 6 2.3. Single window mode .................................................................................................. 7 2.4. Setting the language .................................................................................................. 7 3. GIMP Toolbox......................................................................................................................... 8 4. Basic Skills ............................................................................................................................ 10 4.1. Adjusting the colours ............................................................................................... 10 4.2. Compositing .............................................................................................................. 11 4.3. Layers and Layer groups .......................................................................................... 12 4.4. Texts ........................................................................................................................... 13 4.5. Simple effects ............................................................................................................ 14 Index of photos (and credits) ..................................................................................................... 15 Summary of All Chapters ............................................................................................................ 16
16
Embed
1.csk1/f2cp/13-14/gimp notes.pdf · However, you may use a plugin called UFRaw into GIMP to open RAW images. Figure 2 Raster Graphics Figure 1 Comparison of vector graphics and raster
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Index of photos (and credits) ..................................................................................................... 15
Summary of All Chapters ............................................................................................................ 16
2
1. Image Processing Basics
1.1. Raster Graphics and Vector Graphics
There are two main kinds of
graphics: raster graphics and
vector graphics.
Raster (or bitmap) graphics is to
represent graphics into small
rectangular points called pixels.
(See Figure 2) Raster graphics is
suitable to store digital photos.
In contrast, vector graphics is to represent graphics into
geometric objects like lines, curves, polygon, etc. These objects can be enlarged without
any loss of quality. (See Figure 1), and is therefore useful in visual designs.
1.2. Raster Image Formats
1.2.1. Common raster formats
Common raster image formats are listed below:
Extension Name Properties
BMP Windows Bitmap Accepted in most image processing programs.
JPG (or JPEG)
Joint Photographic Expert Group
Saves storage space using lossy compression. Most commonly used with digital photos.
GIF Graphics Interchange Format
Can only store image in 256 colours. Renowned for its ability to store animations.
PNG Portable Network Graphics Provides better lossless compression than BMP and GIF.
TIF (or TIFF)
Tagged Image File Format Store one or multiple images in the same file. Have an extensive set of options (which are outside the scope of this book).
RAW, CR2, etc…
Raw image formats1. (They are referred as RAW despite having other file extensions.)
A good digital camera can store files in raw image formats, having minimal processing. They can be processed later with the highest quality.
1 GIMP cannot open RAW images by itself. However, you may use a plugin called UFRaw into GIMP to open RAW images.
Figure 2 Raster Graphics Figure 1 Comparison of vector graphics and raster graphics
3
1.2.2. Raster image formats used by image editing software
Image processing software can store extra information, such as text and layers, in its own
file format. If you save the image in these formats, you can open your image later and
continue processing.
Extension Software
XCF GIMP
PSD Adobe PhotoShop
UFO PhotoImpact (Corel / Ulead)
PNG Fireworks (Adobe / Marcomedia)
It is possible to open these files with other programs. However, the image may have
subtle differences if other programs are used.
1.3. Basic Properties of Raster Images
1.3.1. Dimensions
The dimensions of images can be described in its width and height. For example, an
800 × 600 image means it has a width of 800 pixels, and a height of 600 pixels.
To convert the number of pixels into physical units, the dots per inch (DPI) can be
specified for individual images.
The ratio of the width and the height is called the aspect ratio. For example a 800 × 600
photo has an aspect ratio of 4 : 3. If the aspect ratio of a photo is changed in enlargement or
reduction, the image appears deformed and looks ugly.
1.3.2. Colours and Channels
In colour images, such as digital photos, the colour
of each pixel is stored in three numbers. The most
common combination is red, green and blue,
which are the three additive primary colours.
This is known as the RGB Colour Space.
In an image editing software, red, green and blue
are referred as channels of the image. In addition
to the colour channels, the alpha channel is used
to store the opacity of the pixels. (Opacity ranges
from fully transparent to fully opaque.) Figure 3 RGB Colour Space
4
1.3.3. Colour depth
The colour depth, or bit depth, is the number of data bits2 used to represent a pixel.
The colour depth of a digital photo is usually 24 bits, which is having 8 bits in each
channel3. Some image formats, such as BMP and PNG, allow the use an additional 8 bits to
store the alpha channel.4
Grayscale images, having only one channel, usually have a colour depth of 8 bit. Also,
Black and white images have a colour depth of 1 bit.
1.3.4. Colour spaces
It is very difficult to select a colour in the RGB Colour Space. Therefore, GIMP also uses
the HSV Colour Space to represent colours. H stands for hue, S stands for saturation
and V stands for value.5
Hue ranges from 0 to 360 (degrees). 0° stands for red, 120° stands for green and 240°
stands for blue.
High saturation means that the pixel is coloured, while pixels
with zero saturation are black, grey or white pixels. Finally,
high value means that the pixel is bright while low value means
a dark colour.
Other common colour spaces includes HSL, CMYK, Lab and YCbCr.
(Note: you are only required to understand RGB and HSV this year.)
2 A bit is the short form of a binary digit, which has a value of either 0 or 1.
3 Having 8 bits means there are 28 = 256 different levels of each primary colour.
4 The 32-bit pixel with transparency is called RGBA (Red, Green, Blue, Alpha).
5 In Microsoft Windows, a slightly different HSL Colour Space is used, where L stands for lightness.
5
1.3.5. Loseless and lossy compression
To save storage space, compression is used in most image formats, to reduce the actual
amount of storage space needed for images. There are two major kinds of compression.
Loseless compression is a category of compression that the exact original data can be
obtained in the process of decompression. GIF and PNG files employ loseless
compression.
In contrast, lossy compression means that some of the original data is discarded during
compression. In return, the file size of an image with lossy compression is much smaller
than the same image with loseless compression. JPG files employ lossy compression.
Loseless compression is best for hand-drawn graphics, which have large areas of solid
colours. Meanwhile, lossy compression is suitable for photos, because minor losses in
details are not important to the overall quality of the picture.
1.4. Common Features of Image Editing Software
1.4.1. Layers
You can put different objects in into different layers in an
image editing software, so you may move the objects and put
them above or below other objects. For example, the picture
at the right has a layer for the mailbox, a layer for the train
and a layer for the background.
1.4.2. Text
In most image editing software, you may insert text into the image and do simple word
processing.
The font used in the text is NOT stored in the image. Therefore, if you copy the files into
another computer, the font used in the text must also be installed in that computer to make the
text display correctly.
6
2. Introduction to GIMP
2.1. Introduction
GIMP6 is a free image editing software. Unlike Adobe PhotoShop and PhotoImpact, you
can download GIMP from the internet and install it in your computer legally without
paying for the program.
The simplest way to install GIMP is download it from PortableApps.com. Its URL is
http://portableapps.com/apps/graphics_pictures/gimp_portable. Alternatively, you can
download the PortableApps.com platform from http://portableapps.com/download.
2.2. GIMP Interface
When you start GIMP7, you will see the following:
A window called “GNU Image Manipulation
Program” which contains the menu bar.
The Toolbox. Put your mouse over a tool/icon
to see its description. Below the tools there are
the options for the selected tool.
The “Layers, Channel, Paths, Undo” window.
These are the features that make GIMP and
other image editing software more powerful
than Paint.
6 GIMP is the acronym of “GNU Image Manipulation Program”. GNU is the reverse acronym “GNU’s not Unix”; and Unix is the name of an operating system.
7 When you launch GIMP for the first time, you need to wait for several minutes for the program to initialize. Subsequent launches will be much faster.
In this chapter, we will do a few common image processing tasks in GIMP.
Lesson Preparation
Bring three favourite photos which show your full body. It is okay to have someone else in the same photo, but make sure that you are not blocked by something else in the photo.
Hint: send yourself an e-mail with these photos. (The photos will be used in the homework.)
4.1. Adjusting the colours
Learning objective
To adjust the colours of the digital photos.
Instructions
1. Open “garden.jpg”.
2. Use the filters below and experiment.
(Undo before trying the next filter, otherwise the effect will stack.)