2. Computer Graphics “ Perhaps the best way to define computer graphics is to find out what it is not. It is not a machine. It is not a computer, nor a group of computer programs. It is not the know-how of a graphic designer, a programmer, a writer, a motion picture specialist, or a reproduction specialist. Computer graphics is all these – a consciously managed and documented technology directed toward communicating information accurately and descriptively.” Computer Graphics, by William A. Fetter, 1966
3. Topics Photo-taking (self portrait) Short history Terminology Exercise 1 Understand a computer image Exercise 2 Source of images
34. Grid A raster graphics image is a 2 dimensional rectangular grid. Its dimensions are defined by its width and height . Each cell in the grid is a pixel (picture element). It is the smallest visible element of a digital image. Each pixel contains a piece of colour information.
35. Digital Colour There are different ways to describe a colour. By name: red, orange, cobalt blue, brown, lilac, …
36. Digital Colour There are different ways to describe a colour. By name: red, orange, cobalt blue, brown, lilac, … It is, however, not exact. We need to have a systematic way to describe it.
38. RGB A colour is uniquely defined by three numbers. Usually, the range of the 3 numbers are from 0 to 255. R: 0 – 255 G: 0 – 255 B: 0 – 255 For example, yellow is defined as R=255, G=255, B=0. It is mainly used in computer screen display.
42. CMYK A colour is uniquely defined by four numbers. Usually, the range of the 4 numbers are from 0% to 99%. C: 0 – 99 M: 0 – 99 Y: 0 – 99 K: 0 – 99 For example, yellow is defined as C=0, M=99, Y=99, K=0. It is mainly used in printing, i.e. process colour.
43. Others There are other ways to specify colours, HSB (Hue, Saturation, Brightness) Lab (Lightness, a, b) Indexed colour
45. Size of Colour Information To calculate the size of colour information, say, a 800 x 600 image: Number of pixels: 800 x 600 = 480,000 Each pixel has R, G, B. Each colour number ranges from 0 – 255. To represent a number within this range, we have to use 1 byte. For each pixel, we use 3 bytes to store the colour information. The total size of colour information is: 480,000 x 3 = 1,440,000 bytes, i.e. 1.4 Mb.
46. Size of Colour Information It will take too much memory to store an image. Usually, we’ll use some compression methods to store the image in memory.
47. Compression Compression will reduce the file size of an image, by removing redundancy in colour information. There are 2 types of compression: Lossy compression (loss of information when de-compressed) Lossless compression (without loss of information)
50. Transparency For a digital image, we can also include the 4 th colour number, transparency or alpha channel. In this case, each pixel contains, Alpha (A), Red (R), Green (G), Blue (B). It is similar to the use of mask in photography. A white pixel will reveal the image, while a black pixel will mask it. We test the use of transparency in Photoshop.