graphics deliverable - niu college of educationlockard/dk555/computergraphics.doc · web...

82
_______________________________________________________________________ Contents Acknowledgements...........................................i 1. Introduction 1 2. What are Computer Graphics?..........................3 2.1. The Nature of Computer Graphics..........3 2.2. Vector Graphics..........................3 2.2.1........Advantages of Vector Graphics 4 2.2.2.. . . .Disadvantages of Vector Graphics 4 2.2.3..............Uses of Vector Graphics 5 2.3. Bitmapped Graphics.......................5 2.3.1.. . . .Resolution and Colour in Bitmaps 5 2.3.2................Advantages of Bitmaps 5 2.3.3.............Disadvantages of Bitmaps 6 2.3.4.. Lookup Tables, Colour and Greyscale 6 2.4. File Compression.........................7 2.4.1............Run Length Encoding (RLE) 8 2.4.2.......................Huffman Coding 8 2.4.3............Other Compression Methods 9 2.4.4.........Lossless v Lossy Compression 9 2.5. Graphics File Formats and Standards......9 3. Graphics Hardware.................................13 3.1. Memory Issues...........................13 3.1.1.Memory Requirements of Vector v Bitmapped Graphics...........................13 __________________________________________________________________________________________ Understanding IT: Computer Graphics University of Hull

Upload: vannhan

Post on 08-Apr-2018

220 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

_____________________________________________________________________________________

ContentsAcknowledgements....................................................................................................... i

1.Introduction 1

2. What are Computer Graphics?..................................................................32.1. The Nature of Computer Graphics...........................................32.2. Vector Graphics.......................................................................3

2.2.1. Advantages of Vector Graphics....................................42.2.2. Disadvantages of Vector Graphics................................42.2.3. Uses of Vector Graphics...............................................5

2.3. Bitmapped Graphics.................................................................52.3.1. Resolution and Colour in Bitmaps................................52.3.2. Advantages of Bitmaps.................................................52.3.3. Disadvantages of Bitmaps.............................................62.3.4. Lookup Tables, Colour and Greyscale..........................6

2.4. File Compression.....................................................................72.4.1. Run Length Encoding (RLE)........................................82.4.2. Huffman Coding...........................................................82.4.3. Other Compression Methods........................................92.4.4. Lossless v Lossy Compression......................................9

2.5. Graphics File Formats and Standards.......................................9

3. Graphics Hardware.................................................................................133.1. Memory Issues.......................................................................13

3.1.1. Memory Requirements of Vector v Bitmapped Graphics133.1.2. Disk Storage...............................................................143.1.3. Computer Memory (RAM).........................................15

3.2. Monitors.................................................................................153.2.1. CRT Displays.............................................................153.2.2. Liquid Crystal Displays..............................................163.2.3. Video Display Standards............................................17

3.3. Video Cards...........................................................................183.4. Colour Printers.......................................................................19

3.4.1. Problems of Colour Printing.......................................193.4.2. Types of Colour Printer..............................................20

3.5. Limitations of Colour Output.................................................213.6. Colour Scanners.....................................................................22

4. Colour..................................................................................................... 234.1. What is Colour?.....................................................................234.2. The Human Visual System.....................................................244.3. The Perception of Colour and Brightness...............................254.4. Colour Models.......................................................................25

4.4.1. Additive and Subtractive Colours...............................254.4.2. The CIE Diagram.......................................................26

_________________________________________________________________________________________________________Understanding IT: Computer Graphics University of Hull

Page 2: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Contents_____________________________________________________________________________________

4.4.3. Red, Green and Blue (RGB).......................................274.4.4. Hue, Light and Saturation (HLS)................................274.4.5. Hue, Saturation and Value (HSV)...............................284.4.6. Cyan, Magenta, Yellow and Black (CMYK)..............294.4.7. Other Colour Models..................................................29

4.5. The Use of Colour..................................................................304.5.1. Lighting and Backgrounds..........................................304.5.2. Warm and Cool Colours.............................................304.5.3. Colour Deficiency......................................................31

5. Graphics Packages..................................................................................335.1. Popular Microcomputer Graphics Packages...........................33

5.1.1. Painting and Drawing.................................................335.1.2. Presentation................................................................345.1.3. Photography...............................................................355.1.4. Graphics Utilities........................................................365.1.5. Animation...................................................................36

5.2. Incorporating Graphics into Applications and Documents......375.2.1. Programming Languages and Authoring Tools...........375.2.2. Desktop Publishing (DTP)..........................................385.2.3. Placing Graphics into Non-Graphics Files..................39

6. Computer Graphics in Higher Education.................................................41

Glossary........................................................................................................ 43

Annotated Bibliography.................................................................................47

Index............................................................................................................. 51

_________________________________________________________________________________________________________Understanding IT: Computer Graphics University of Hull

Page 3: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

_____________________________________________________________________________________

Acknowledgements

This book was written at the University of Hull under the auspices of the Information Technology Training Initiative (ITTI) project Multimedia-based IT Training for the Humanities. ITTI is an initiative of the Information Systems Committee of the Higher Education Funding Councils.

I would like to thank all the people who have helped me, directly or indirectly, in this project, in particular Dr Lorraine Warren for her role in the genesis of this book, Richard Hicks for his technical advice, James Willmott for introducing me to cyberspace (and providing landmarks), and Jenny Parsons upon whom I inflicted early drafts for review and criticism. I also wish to thank all the staff at the University of Hull Computer Centre for all the help and invaluable expertise they have given me in this and other projects, and the staff at the Language Centre for giving me a home and cups of tea.

Registered Trademarks

The following table lists the registered trademarks used in this work:

Trademark Company

PostScript AdobeMacPaint AppleMacintosh AppleGIF CompuServeCorel Draw! Corel CorporationWindows MicrosoftPantone Pantone IncHarvard Graphics Software Publishing CorporationTarga Truevision Inc.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics i University of Hull

Page 4: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Acknowledgements_____________________________________________________________________________________

_________________________________________________________________________________________________________Understanding IT: Computer Graphics ii University of Hull

Page 5: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

__________________________________________________________________________________

Chapter One

Introduction

We are all familiar with computer graphics, in the sense that we see them everyday: on television, in films, in books and magazines, on posters, and - of course - on our computer monitors. They are so ubiquitous that we no longer pay them any special heed.

Yet, even though computer graphics surround us, most of us know very little about them. What are they? How can they be created and edited? How can we use them? Why should we use them? Even people who use graphics packages are often unaware of the nature of the graphics they are manipulating and are unable to understand, for example, the difference between metafiles and bitmaps, or why resizing a picture can distort and degrade it, or how to use the vast range of image effects that are supplied with today's packages, and so on.

This publication attempts to answer such common questions and to thus enable the reader to understand computer graphics and use them (more) effectively. It is not a text for programmers who want to write Assembler routines to decode PCX files, or for people looking for Bezier curve algorithms. Rather, it is aimed at the 'average' user with at least a basic level of computer literacy - that is, you should know the meanings of terms such as processor and operating system - and no previous knowledge of computer graphics is assumed. Instead, the information within is biased towards the practical, so that the reader can learn about, say, colour models, then attempt to apply that knowledge in their favourite graphics package. The emphasis is also upon generic information which can be applied whichever package you use, rather than specific instructions as to how to carry out operations in a particular application.

This work is slanted heavily towards microcomputers, in particular PCs and Apple Macintoshes. There are two main reasons for this. Firstly, the ordinary user is much more likely to have access to a humble micro than a Sparc workstation; and secondly, it is highly probable that users of high-end graphics workstations are familiar with computer graphics concepts already and will gain little from a beginners' text. Nevertheless, much of the information in the following pages is applicable whatever your platform.

Chapter Two, What are Computer Graphics?, answers that basic question by looking at the two different types of graphic - vector and bitmap (raster) - and the associated pros and cons. Much of the Chapter is devoted to bitmapped graphics, particularly the issues of memory, disk storage and file compression.

Chapter Three, Graphics Hardware, looks at the hardware requirements of computer graphics. It explores the topics of memory (including video memory) and disk storage in further detail than Chapter Two, explains how graphics are output on both monitors and colour printers, and finally considers colour scanners.

Chapter Four, Colour, looks at the human visual system and the way we perceive colour, goes on to consider some of the colour models in common use, and ends with some brief guidelines on how colour should be used.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 1 University of Hull

Page 6: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Introduction__________________________________________________________________________________

Chapter Five, Graphics Packages, looks at the types of applications available in the micro market both to create graphics and to incorporate them within documents and applications.

Chapter Six, Computer Graphics in Higher Education, is a short section which considers some of the possible educational uses to which graphics can be put.

At the end of the work there is a glossary, an annotated bibliography, and an index to help the interested reader dig deeper into the field of computer graphics.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 2 University of Hull

Page 7: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

__________________________________________________________________________________

Chapter Two

Chapter Three

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 3 University of Hull

Page 8: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

__________________________________________________________________________________

Chapter Four

Chapter Five

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 4 University of Hull

Page 9: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

__________________________________________________________________________________

Chapter Six

Computer Graphics in Higher Education

If a picture is worth a thousand words, there can be few more obvious uses for it than in the area of imparting knowledge to others. Text is not a very natural teaching medium for us. Not only does it have a low information density but it also results in processing overheads for the brain, insofar as it is a symbolic representation of information that has to be decoded. Still and moving images, on the other hand, usually require no decoding (although they need a lot of interpretation) and have high information densities. Moreover, the human visual system has evolved to be highly efficient at information gathering and processing, so the presentation of information as graphics takes advantage of this natural ability. (This is by no means to deride text - plainly it would not be possible to put across the information in this book purely graphically - but simply to recognise its limitations.)

It would not be accurate to say as yet that computer graphics has qualitatively changed the delivery of education and training, although it has certainly significantly enhanced the quality of teaching. In contrast to science, where new technologies open up new avenues of research and change the ways that science is carried out, the practice of teaching changes slowly and is driven by theories of learning as well as more contingent socio-economic factors. Primary of these factors, of course, is the availability of funding, and this has meant that the use of computer graphics in public education has lagged behind private training. Corporations are willing to spend large sums on high-end training facilities because of the real productivity gains that can be realised and measured in cash terms. This contrasts with public education where 'productivity' is a more slippery concept and where the information being conveyed is of a different nature from training: broadly speaking education is about concepts and techniques - the Why and How - whereas training concentrates narrowly on the How.

This concentration upon technique makes training much more amenable to the use of computer graphics than education. It's a fairly simple matter to use graphics to illustrate the assembly of an electronic circuit, but rather harder to explain the quantum mechanics that enable the semiconductors in the circuit to work.

However, there are areas of education where graphics can, and are, being put to good use. In the sciences visualisation - the graphical representation of data - is used extensively for both data analysis and teaching, and in many fields images are essential to grasp fundamental concepts - the structure of a molecule in chemistry, or the process of cell division in biology, for example. The teaching of history, particularly of the 20th century, could benefit from the use of the vast amount of still and moving images in the archives, as could the teaching of Art by the use of image databases.

There are a few subjects which would not benefit substantially from the use of computer graphics in their teaching: it's difficult to see how courses in such areas as English Literature, Philosophy, Music, or Theology, could be much enhanced by images whether moving or still. These, though, are the exceptions rather than the rule, and in most subjects the judicious use of graphics can only improve the teaching material. If nothing else, the inclusion of interesting images can make learning fun,

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 5 University of Hull

Page 10: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Computer Graphics in Higher Education__________________________________________________________________________________

which of course has a positive effect on the student's attitude and thus on knowledge uptake.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 6 University of Hull

Page 11: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

__________________________________________________________________________________

Glossary

Actor An active object in an animation.ADC Analogue to Digital Converter. A specialised chip which converts an analogue waveform into digital data. The reverse process is carried out by a Digital to Analogue Converter (DAC).Additive Colours Colours produced by the addition of light from luminescent primary sources, which in the case of computer monitors and televisions are red, green and blue. See also RGB.Aliasing Image imperfections whereby jagged edges and staircasing appear on lines and edges due to the limitations of raster systems in the representation of lines and curves. These imperfections may be removed by anti-aliasing, a technique which varies the intensities of pixels along the line. Authoring Tool A program which enables the user (author) to create applications without writing computer progrms.Bandwidth The range of frequencies in which a signal is transmitted. The greater the bandwidth the more information the signal carries.Bitmap A computer graphic composed of individual dots known as pixels.CCD Charged Coupled Device. A photosensitive semiconductor which emits a voltage proportional to the intensity of the light falling upon it. Used in scanners.CDROM An acronym for Compact Disk Read Only Memory. A CDROM is physically identical to an audio CD, and is used to store large amounts of data (up to 600MB). This makes it particularly useful for distributing large graphical or video files, and for reference works like dictionaries. A CDROM is read by a CDROM drive which can be either inside or outside the computer. CGA Colour Graphics Adaptor. An obsolete PC monitor standard, capable of displaying low-resolution graphics (640x200 pixels) in 16 colours.Character Generator A device implemented in display system hardware which creates standard text characters on screen. A PC uses its character generator when operating in text mode.CIE Diagram A conceptual colour space empirically derived from data on human colour perception by the Commission Internationale de L'Eclairage in 1931.Clip Art Digital images in the public domain which can be used without copyright restrictions.CMYK Standing for Cyan, Magenta, Yellow and blacK, the colour scheme used for printing. Although in theory cyan, magenta and yellow inks can combine to form black, in practice the mixture is often not sufficiently dark so additional black ink is used.Colorimetry The science of colours, or more explicitly - given that colour is a purely human perception of the visible part of the electromagnetic spectrum - the science of the human perception of colour.Colour Model Empirical colour description scheme based on the concept of colour mixing, whereby each shade is specified by a unique combination of primary factors such as hue, saturation and brightness. Colour Wheel Spectral hues arranged in a circle so that opposite colours (180º apart) are complementary.Compression The process of removing redundant data from a file to reduce its size.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 7 University of Hull

Page 12: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Glossary__________________________________________________________________________________

CRT Cathode Ray Tube. A CRT produces an image by firing electrons at phosphorescent dots on the inside of the screen. In a colour CRT three electron guns and three colours of phosphor dot - red, green and blue - are used.DAC Digital to Analogue Converter. A specialised chip which converts digital data into an analogue waveform. The reverse process is carried out by an Analogue to Digital Converter (ADC).Desktop Publishing (DTP) The use of computer software to produce printed publications which can incorporate both text and graphics.Digitise To convert a real-world image or sound clip into binary data so that it can be read by computers.Direct Complement The direct complement of a colour is the colour which lies opposite it on the colour wheel; it can also be thought of as its 'negative'. Dithering On systems with a limited number of colours dithering is a method of simulating out-of-range colours by mixing pixels/dots of existing colours. For example, a 16-colour system can display 256-colour images using dithering. If there are only two colours available, such as is the case with monochrome printers, the process is known as half-toning; this is how black-and-white newspaper pictures are produced.DPI Dots per inch, a measure of image resolution on output devices such as monitors and printers.EGA Enhanced Graphics Adaptor. PC monitor mode capable of displaying 16 colours at 640x350 resolution.Electron Gun Used in CRTs (such as televisions and desktop computer monitors). An electron gun fires a beam of electrons at phosphorescent dots on the inside of the screen. See CRT.False Colour Artificial colour applied to a greyscale image in image processing in order to enhance salient features of the image.Film Recorder A hardware device which prints a computer graphic to a photographic medium, usually 35mm slides. Film recorders are used by slide bureaux to convert computer-based presentations into slides.Framestore See Video RAM.Graphical User Interface (GUI) An interface between an application or operating system and the user which communicates with the user by employing graphical elements, such as windows and icons. Sometimes known as a WIMP Interface (Windows, Icons, Menus, Pointer). Examples include the Macintosh System 7, Microsoft Windows, and Sun OpenWindows.Greyscale The range of grey shades available on a system.Greyscale Image A monochrome bitmap where pixel values are interpreted as different shades of grey on a scale from pure white to pure black.HLS Hue, Light and Saturation. An additive colour model appropriate for visual displays, developed by Tektronix.HSV Hue, Saturation and Value. An additive colour scheme for visual displays.Hue A pure - 100% saturated - colour. A hue is a spectral colour, one that occurs in the visible spectrum. Hue, Light and Saturation See HLS.Hue, Saturation and Value See HSV.Interlacing A method of producing high-resolution displays by scanning every alternate line in a frame, thus taking two frames to display the whole picture. Normally found in less expensive systems.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 8 University of Hull

Page 13: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Glossary__________________________________________________________________________________

Interpolation A method of enlarging bitmaps by adding extra pixels, substituting each pixel in the original image by a n x n square of pixels where n is the degree of enlargement.Liquid Crystal Display A visual display which exploits the light polarisation properties of special molecules (liquid crystals) when small voltages are applied to them. LCD displays are used in portable computers because of their lightness and low power consumption.Lookup Table (LUT) A subset of the full palette available on a system. The LUT is a set of index values which point to colour values in the full palette.Megaflop A million floating-point operations per second. Often used as a measure of processor speed.Object A constituent part of a vector graphic composed of other objects and/or primitives.Object Linking and Embedding (OLE) A feature introduced by Microsoft with Windows 3.1 allowing data from any OLE-aware Windows application file to be placed into another similar file, even if they are of different application types (eg a sound file being placed into a word processing document).Object-Oriented In graphics terms, referring to a vector-based drawing package.Operand See Parameter.Optical Media Storage media in which laser light is used to read and write disk data, such as CDROMs and Laserdisks. Optical media are generally read-only, as the laser used in the writing process burns pits into the disk surface, but some expensive optical disks are read/write.Page Description Language Commonly used in Desktop Publishing, PDLs are effectively programming languages which instruct output devices how to output documents. One of the most common PDLs is Adobe Postscript. PAL The main analogue video standard used in the world outside North America and Japan.Palette The full range of colours available on a system.Pantone A standard colour matching scheme for printing which specifies the percentage of each primary colour used to produce a particular shade. Each shade has a unique shade number. The scheme was created to achieve uniformity and consistency in colour printing.Parameter Data supplied to a command, usually in parentheses. For example, the common graphical primitive rectangle(x1,y1,x2,y2) takes the four parameters x1, y1, x2, y2.Phosphor Dot A dot coloured red, green or blue on the screen surface, which phosphoresces when struck by electrons. An RGB triplet of phosphors comprises a pixel.Pixel Picture Element. A discrete dot on a television or monitor, or the smallest element in a bitmap.Primary Colours Pure hues which when mixed can produce the full range of visible shades.Primitive The lowest level vector graphics object, such as a line or a rectangle. All objects are ultimately composed of primitives. Raster Scan Device See Cathode Ray Tube.Ray Tracing An important form of rendering which produces more 'realistic' scenes by taking into account factors such as the lighting of the scene and the reflectivity or opacity of the scene objects.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 9 University of Hull

Page 14: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Glossary__________________________________________________________________________________

Refresh Rate The number of times a second a display is redrawn. To give a flicker-free display this needs to be at least 25 times a second.Rendering The generation of artificial 3-D scenes using geometrical and lighting data.RGB Standing for Red, Green and Blue, the colour scheme used by colour monitors and televisions. Different intensities of each colour combine to produce the full colour range.Saturation The amount of pure hue in a colour, on a linear scale from 0% saturation - no hue at all, resulting in a white or grey - to 100% saturation which represents the pure hue itself. Pastel colours lie within this range.Scanner A hardware device for digitising (converting to binary data) printed material, such as pictures on paper or 35 mm slide.Shadow Mask In a CRT, a sheet of metal with regular apertures which focusses the beams from the electron guns onto their corresponding phosphors.Spectral Colour A colour of the visible spectrum, a pure fully-saturated hue.Split Complement The split complements of a colour are those which lie either side of its complement on the colour wheel.Subtractive Colours Colours produced by the subtraction of colours from incident light. A tomato appears red in daylight because it absorbs all other colours in the visible spectrum other than red, which it reflects. See also CMYK.Super VGA A wide term, covering a number of screen devices with superior resolution and/or colour capability to VGA. VGA Video Graphics Adaptor1. A PC monitor standard of at least 640 x 480 x 16 colours.Video Card A slot-in expansion card containing video RAM and - usually - a processor, which improves the resolution and colour depth of the display. Some video cards, known as accelerator cards, also speed up the display by reducing the screen redraw time.Video RAM (VRAM) The amount of dynamic memory devoted to screen display, usually resident on the video card. Also known as the framestore.Window A rectangular viewing area which is processed separately from the rest of the screen.WORM Write Once Read Many times. A type of read-only optical disk usually employed for archiving.WYSIWYG "What You See Is What You Get", pronounced "wizziwig". Normally applied to Word Processing and Desk Top Publishing packages which operate in a graphical mode. What appears on the screen is what will appear on hard copy.

1 Some textbooks translate the acronym as 'Video Gate Array'.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 10 University of Hull

Page 15: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

__________________________________________________________________________________

Annotated Bibliography

Author Title

Ammeraal, Leendert Graphics Programming in Turbo C. 1989. Wiley & Sons, Chichester.Guide to graphics programming using Borland Turbo C version 2.0

Arnold, D B Duce, D A

ISO Standards for Computer Graphics: The First Generation. 1990. Butterworths, London. A detailed treatment of the ISO-approved graphics standards - PHIGS, GKS, CGM, etc - and the standardisation and approval procedures.

Baker, M P Hearn, D

Computer Graphics. 1986. Prentice-Hall, London.Theoretical and practical study of underlying concepts of computer graphics, including maths (algebra, matrices) and Pascal code, well-diagrammed throughout.

Barlow, HoraceBlakemore, ColinWeston-Smith, Miranda

Images and Understanding. 1990. Cambridge University Press, Cambridge.Collection of papers from an international conference on the title subject, held in 1986.

Beard, Nick Visualisation - a series of 4 articles in Personal Computer World, Vol 15 (11 & 12) & Vol 16 (1&2) (Nov 1992 - Feb 1993). A non-technical look at data visualisation.

Browne, JimmieMcMahon, Chris

CADCAM: From Principles to Practice. 1993. Addison-Wesley, Wokingham.A standard introductory technical texbook on the subject.

Burger, Peter Gillies, Duncan

Interactive Computer Graphics. 1989. Addison-Wesley, Wokingham.Comprehensive and advanced treatment of computer graphics with mathematical concepts and algorithms.

Carlson, W E A Survey of Computer Graphics Encoding and Storage Formats. Computer Graphics, April 1991, Vol 25(2), pp 67-75.A survey of several graphics file formats, including descriptions of common compression methods.

Durrett, H J (ed) Color and the Computer. 1987. Academic Press Inc, Orlando, Florida.A collection of papers on the title subject, discussing topics such as Colour Science, colour and human-computer interaction, and colour hardware.

Foley, Jvan Damm, AFeiner, SHughes, J

Computer Graphics Principles & Practice. 1990. Addison-Wesley, Reading, Mass.Very large and all-embracing text on the theory and practice of computer graphics, particularly mathematical

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 11 University of Hull

Page 16: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Annotated Bibliography__________________________________________________________________________________

concepts and algorithms.Gonzalez, Rafael C Woods, Richard E

Digital Image Processing. 1992. Addison-Wesley, Reading, Mass.Comprehensive introductory text to the field of Image Processing.

Hopgood, F R A Using Colour in Computer Graphics. 1991. Advisory Group on Computer Graphics, Loughborough University.A short and concise paper from ACOCG's Technical Report Series.

Hopgood, F R A Duce, D AJohnston, D J

A Primer for PHIGS: C Programmer's Edition. 1992. Wiley & Sons, Chichester. Technical desciption of the PHIGS standard from a C programmer's perspective, with full details of the C language binding and example source code.

Jute, André Colour for Professional Communicators. 1993. Batsford, London.A friendly and colourful 'how to' guide to the use of colour for communication.

Kay, David CLevine, John R

Graphics File Formats. 1992. Windcrest/McGraw-Hill, NY.Excellent reference on all the graphics file formats in current use, giving detailed technical information about each format.

Latham, Roy The Dictionary of Computer Graphics Technology and Applications. 1991. Springer-Verlag, NY.A comprehensive dictionary of computer graphics terminology.

Low, Adrian Introductory Computer Vision and Image Processing. 1991. McGraw-Hill, Maidenhead.

Mealing, Stuart The Art and Science of Computer Animation. 1992. Intellect Books, Oxford.Comprehensive and accessible textbook covering all aspects of the field of animation.

Peterson, Ivars The Mathematical Tourist. 1988. W H Freeman, NY.A non-mathematical look at some aspects of modern mathematics, particularly mathematics which can be expressed graphically, such as fractals.

Pickover, Clifford Computers, Pattern, Chaos and Beauty.1990. St Martin's Press, New York.An eclectic work on the images that can be generated on computers using non-linear mathematical functions .

Rimmer, Steve Bit-Mapped Graphics. 1990. Windcrest Books, Blue Ridge, PA.A highly technical book for C and Assembler programmers on common bitmap formats and how to display and manipulate them. Contains plenty of source code.

Rogers, D F Adams, J A

Mathematical Elements for Computer Graphics. 1990. McGraw-Hill, NY.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 12 University of Hull

Page 17: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Annotated Bibliography__________________________________________________________________________________

Heavily theoretical mathematical treatment of computer graphics concepts, from simple 2D and 3D transformations to surfaces and splines.

Rowell, Jan Picture Perfect: Color Output for Computer Graphics. 1991. Tektronix Inc, Beaverton, Oregon.A glossy, friendly booklet on colour and colour printing with an unsurprising bias towards Tektronix products. Well written and informative, though.

Smith, W JThorell, L G

Using Computer Color Effectively: An Illustrated Reference. 1990. Prentice-Hall, New Jersey.

Stonier, Tom Information and the Internal Structure of the Universe. 1990. Springer-Verlag, London.Subtitled "An Exploration into Information Physics" the book outlines the author's view that information is an integral part of the natural world.

Warren, Lorraine Understanding IT: Computer-based Presentations. 1994. University of Hull. A highly readable guide to producing presentations with presentation packages.

Watt, Alan Fundamentals of Three-Dimensional Computer Graphics. 1989. Addison-Wesley, Reading, Mass.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 13 University of Hull

Page 18: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Annotated Bibliography__________________________________________________________________________________

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 14 University of Hull

Page 19: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

__________________________________________________________________________________

Indexanimation, 36-37authoring packages, 37-38bitmapped graphics, 5-7

advantages, 6colour depth, 5disadvantages, 6memory, 5, 6, 13-14resizing, 6resolution, 5

brightness, 25cathode ray tube (CRT), 16charged coupled device (CCD), 22Clip Art, 34colour

additive, 19, 26definition, 23depth, 5dithering, 19greyscale, 7, 16perception, 24-25spectral, 26subtractive, 19, 26warm and cool, 30-31

colour modelsCIE diagram, 26-27CMYK, 19, 29HLS, 27-28HSI, 29HSV, 28-29HVC, 29RGB, 27

colour printers, 18-21dot matrix, 20dye sublimation, 21inkjet, 20laser, 21limitations, 21plotters, 21resolution, 19thermal wax, 21

colour wheel, 30computer memory (RAM), 15desktop publishing (DTP), 38-39dichromatism, 31direct complements, 30disk storage, 14-15

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 15 University of Hull

Page 20: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Index__________________________________________________________________________________

optical media, 14drawing package, 4electron guns, 6, 15eye

colour perception, 24-25diagram, 24retina, 24rods and cones, 24

false colour, 7file compression, 8-10, 15

fractal, 9Huffman coding, 9lossless and lossy, 9run length encoding (RLE), 8

file formats, 10-13conversion between, 36

graphics packagesanimation, 36-37desktop publishing, 38-39photo editing, 35-36presentation, 34-35utilities, 36

hue, 27image processing, 6image processing, 37intensity, 25interlacing, 17interpolation, 19liquid crystal display (LCD), 16-17lookup table, 6matrix addressing, 16Microsoft Windows, 39monitors, 15-18

CRT, 16LCD, 17

object, 3, 13object linking and embedding (OLE), 39Pantone, 29phosphor dot, 15photographs, digitised, 35pixel, 5, 14primitive, 3, 14saturation, 27shadow mask, 15split complements, 30SVGA, 16System 7, 39vector graphics, 3-5vector graphics

advantages, 4

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 16 University of Hull

Page 21: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Index__________________________________________________________________________________

disadvantages, 4memory, 13uses, 5

video card, 15video cards, 18video ram (VRAM), 5, 15, 18visual system, human, 23-24

Graphics Packages

This Chapter looks at the graphics programs available to the 'ordinary' user - that is, the sort of package that can be bought from the dealers that advertise in the mainstream computer press. It lists some of the leading product in each application category and explains how graphics are incorporated into useful applications, either by using programming and/or authoring or by employing the inherent features of the Windows and Macintosh Graphical User Interfaces (GUIs). However, the relative merits of packages are not discussed as this is a survey of the market rather than a review of individual products.

5.1 Popular Microcomputer Graphics Packages

5.1.1 Painting and Drawing

The most popular types of graphics application are undoubtedly general purpose painting and drawing packages. Such a package allows the user to create original artwork, or to edit and manipulate existing computer graphic images. These graphics can then be used in a number of ways, including:

· desktop publishing· enhancing documents with diagrams and pictures· business presentations· training and education· databases

and so on - the list is potentially endless. Although often used interchangeably, the terms painting package and drawing package refer to bitmapped and vector-based (sometimes called object-oriented) applications respectively; a generic term that includes both might be 'art package'. Tables 5.1 and 5.2 list some of the best-known computer art packages available at the time of writing2 for both Macintosh and PC.

2 It must be emphasised that these tables are neither exhaustive nor necessarily indicate the best packages on the market: new packages emerge seemingly daily and any list is no better than a snapshot of a dynamic market.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 17 University of Hull

Page 22: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Index__________________________________________________________________________________

Package PC Mac NotesClaris MacPaint Ö Monochrome only.Electronic Arts Studio/8 Ö Also available as Studio/32, for 32-bit colourAldus SuperPaint ÖWindows Paintbrush Ö Comes free with Microsoft Windows.

Table 5.1Popular bitmapped computer art packages

Package PC MacAdobe Illustrator Ö ÖAldus Freehand Ö ÖCA CricketDraw Ö ÖClaris MacDraw ÖCorel Draw! ÖHarvard Graphics ÖMicrografx Designer Ö

Table 5.2Popular object-oriented (vector) computer art packages

Most modern commercial applications now include both bitmapped and object-oriented editors in the full package to enable the user to handle any graphic they may come across. For example, the Corel Draw! suite of applications includes the object-oriented Draw! itself and the bitmap editor PhotoPaint!

It is quite common for large Clip Art libraries to be distributed with graphics applications. Clip Art is the generic term applied to computer graphics images that are in the public domain and can be used freely, without copyright restrictions. Both vector and bitmapped Clip Art is available in a wide variety of file formats and in an astonishing range of subjects. Given the size of modern programs and the amount of Clip Art bundled with them the preferred distribution medium for commercial applications is rapidly becoming the CDROM.

5.1.2 Presentation

The use of slide shows to present, promote and sell ideas, services and products has a long history predating the advent of computers. Data is often much more comprehensible when presented visually as an image (such as a pie chart or bar graph), and across all fields people whose job it is to make presentations to audiences know that slides can complement and enhance their performance. Modern micros with their rapidly improving graphics capabilities are ideal vehicles for creating and displaying 'slide shows'. Each 'slide' is simply a computer graphic - usually vector-based - created using standard techniques which can then be printed to film, paper or acetate, or displayed direct from the computer.

Computer-generated slide shows have a number of significant advantages over traditional methods:

· distribution: a large presentation can be saved to disk and copied or downloaded cheaply and quickly

· ease and cost of production: anyone with a micro and presentation software can create a presentation, eliminating the cost and delay of using professional bureaux

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 18 University of Hull

Page 23: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Index__________________________________________________________________________________

· ease of editing: changes can be made to slides with little effort or waste

· special effects: using the computer for the presentation means that sophisticated visual effects can be included in a 'show', including sound, video and animation

As a consequence, a large and lucrative market in presentation software has exploded into being in recent years. In addition, it is now quite common for large drawing packages to include slide show 'modules' within the package. Table 5.3 is a sample of the specialist presentation packages currently on the market.

Package PC MacAldus Persuasion Ö ÖCA Cricket Presents Ö ÖMacroMedia Action Ö ÖMicrografx Charisma ÖMicrosoft Powerpoint ÖSymantec More Ö

Table 5.3Presentation Packages

5.1.3 Photography

As hardware becomes more and more powerful so the field of photography has been brought into computing. Photographs - whether negative, print or slide - can now be digitised by scanners and saved as bitmaps, despite the enormous memory overheads of high-resolution true-colour photos. This service, which was once the exclusive province of professionals, has been brought on to the high street by Kodak with their proprietary PhotoCD technology: ordinary members of the public can walk into a retail photographic shop and have their negatives digitised on to a CDROM.

In recent years a number of packages have come on the market that are capable of manipulating digitised photographs. These programs are essentially sophisticated bitmap editors tailored to the requirements of photographic editing which allow an impressive array of image processing effects to be applied to the photographic image, such as changing its colour balance or smoothing or enhancing certain features, as well as detailed editing down to the level of individual pixels. Indeed, in skilful hands the image can be retouched drastically without any sign of these changes appearing in the final print; the old saying that 'the camera never lies' has never been less true than today. Because of the high memory requirements of photographic bitmaps, and the amount of processing involved in applying image processing techniques to them, photographic applications require high-end machines to run efficiently.

Package PC Mac NotesAdobe Photoshop Ö ÖAldus PhotoStyler ÖCorel PHOTO-PAINT Ö Supplied with Corel Draw!Kodak PhotoCD Access Ö Ö Just used for decoding PhotoCD files, and only

supports simple operations such as clipping and scaling.

Micrografx Photo Magic Ö Supplied with Micrografx Graphics Works

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 19 University of Hull

Page 24: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Index__________________________________________________________________________________

Table 5.4Photographic editing applications

5.1.4 Graphics Utilities

Traditionally the field of computer graphics has been beset by a profusion of incompatible file formats and this has been a fertile ground for the growth of utility programs which convert images from one format to another. Increasing user demand for sophisticated bitmap editing facilities, including the application of special effects to the image, also spawned a large number of utilities, as until the recent past both painting and drawing packages were relatively basic. Modern packages, however, incorporate graphics file conversion filters for a wide range of file formats, and an often bewildering armoury of image processing tools to create special effects, so the niches occupied by graphics utilities are gradually shrinking.

The vast majority of these utilities are in the public domain, either as shareware - software which can be copied freely and used on a 'try before you buy' basis - or freeware. There are so many utilities, and they vary so much in quality (although all are cheap), that it would be a fruitless and inaccurate exercise to compile a list of the 'best-known' or 'most common'. The best advice for users who feel they may need one or more utilities - possibly because their art package has only rudimentary facilities - is to consult sources of shareware, usually either a dealer or a software archive.

5.1.5 Animation

Animation is a very recent arrival on the microcomputer scene primarily because it requires a fast processor and a large amount of memory. Essentially, animation is no more than a series of frames flashed before our eyes so quickly that they give the appearance of movement. In this respect, computer animation is no more sophisticated than 'what-the-butler-saw' machines. However, computers do vastly ease the animator's job by being able to extrapolate frames from a start point and an end point. If, for example, the start scene is a car at the left edge of the screen and the end scene the same car at the right edge the computer can use in-betweening to create the intermediate frames. When the scene is played from start to end it appears that the car is moving across the screen. In traditional animation these intermediate scenes would have to be drawn by hand.

Animation packages are vector-based, object-oriented applications. Each figure in an animation is an object (an actor, in animation jargon) the properties and movements of which are defined by the user. This means that all the information about a particular animation - objects, backgrounds, movement - can be stored quite compactly, in the same way that vector graphics produce compact files.

Because animation is such a new field in the microcomputer world, and because its market isn't as well defined as that of art or presentation packages, there are relatively few packages on the market. Table 5.5 shows the most common.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 20 University of Hull

Page 25: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Index__________________________________________________________________________________

Package PC Mac NotesAutodesk Animator ÖCorel Move! Ö Supplied with Corel Draw!Gold Disk Animation Works Interactive

Ö Ö

MacroMind Director Ö

Table 5.5Animation packages

5.2 Incorporating Graphics into Applications and Documents

Graphics often need to be used within programs to have the most effect. For example, a series of photographs of archeological sites may be quite nice to look at in a drawing package, but their impact and educational content is exponentially increased by placing them within a program which contains text about the sites, uses image processing techniques to bring out hidden features (old field boundaries, for instance), and cross-references sites according to age and period to show germane features of the civilisations that created them.

We have already looked at one method of using graphics in a program, in the previous section on Presentation Packages, and in the following sections we explore other methods of using the informational power of computer graphics within applications.

5.2.1 Programming Languages and Authoring Tools

These are the 'traditional' methods of creating applications. Programming languages allow the programmer to have close control over the computer, but of course require programming skills to use and have a steep learning curve . Their use is thus restricted to IT professionals and enthusiastic users with a lot of time. These days programming languages incorporate such a vast array of graphics-handling functions that it's often easier to list what programmers can't do with graphics than what they can.

Authoring tools allow authors without programming skills to produce applications, usually in particular subject areas. Using simple actions such as selecting text and applying menu commands complex structures can be created, the 'pre-programming' of these structures already having been performed by the developer. Usually a small amount of simple programming in a language specific to the package is required to get the most out of the system but full-blown programming skills are never called for. All authoring packages have graphics-handling capabilities which can range from the rudimentary to the sophisticated often depending, unsurprisingly, on the cost of the package. The main drawbacks of authoring tools are:

· Proprietary software. An authoring package is linked inextricably with the company that produced it, unlike general-purpose programming languages which are in the public domain. This usually results in a severe lack of portability because an application produced in a particular package can only be

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 21 University of Hull

Page 26: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Index__________________________________________________________________________________

run in that one package (or a cut-down runtime version of it used for distributing the application).

· Efficiency. Applications produced by an authoring system are usually slower and less efficient than if they had been written in a programming language.

· Specialisation. Although most tools attempt to be general-purpose application generators, in practice they tend to be very good in certain areas and poor in others.

On the other hand ordinary users - even computer novices - can produce usable applications with authoring tools after only a short learning period, and it is this productivity together with ease of use that are the main selling points of authoring packages and the reasons for their enduring popularity. Table 5.6 lists some of the most common.

Package Company PC Mac NotesAuthorware Professional

Authorware Inc Ö Ö

Guide Info-Access Ö Primarily for hypertext applications.Hypercard Claris Ö The most popular application generator in the

Mac world.IconAuthor AimTech Corp. ÖToolbook Asymetrix Ö Sometimes called 'Hypercard for the PC'

because of its similarities to the Mac program.

Table 5.6Authoring packages.

5.2.2 Desktop Publishing (DTP)

Desktop Publishing is the name given to the process of producing documents containing both text and graphics - newspapers, magazines, etc - using a computer. The phenomenal growth in the power and affordability of DTP packages for micros has put publishing into the hands of anyone with a micro and a laser printer. DTP applications allow very sophisticated text formatting and the placing of a wide variety of graphics within the publication. Their graphics-handling capabilities are usually restricted to cropping and resizing, so the editing of a graphic has to be performed in a specialist graphics package.

DTP owes its very existence to the rapid advances in the graphics capabilities of computers, particularly micros. Not only is its raison d'etre the incorporation of graphics into text, but the WYSIWYG (What You See Is What You Get) display of DTP programs, whereby the document appears on the screen exactly as it will print, is extremely graphically intensive.

Despite being a relatively mature field - in microcomputing terms - DTP is dominated by just a few packages (Table 5.7), although given the abilities of modern Word Processing programs the line between WP and DTP is becoming ever more tenuous.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 22 University of Hull

Page 27: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Index__________________________________________________________________________________

Package PC MacAdobe Illustrator ÖAldus PageMaker Ö ÖQuark Xpress ÖVentura Publisher Ö

Table 5.7Leading DTP packages

5.2.3 Placing Graphics into Non-Graphics Files

Graphics can also be placed into files generated by non-graphics packages by cut and paste techniques. If both packages work within the same operating environment, such as the Macintosh System 7 which uses a common data format regardless of the type of file, then data can simply be copied from the source to the destination via the clipboard (an area of memory set aside for temporary storage). For example, you could create a drawing in MacDraw, select that drawing, copy it to the clipboard, and paste it into a MacWrite document.

A qualitative improvement on simple cut and paste is Object Linking and Embedding (OLE) introduced by Microsoft in Windows version 3.1. Central to OLE is the object, defined as data created by a Windows application that can be placed - either by linking or embedding - into another Windows application.

The capacity to use OLE has to be specifically built into a Windows application by its programmers, although this is now the case with the vast majority of commercial Windows programs. Programs that support OLE can be either, or both:

a server, which can supply objects to other applicationsa client, which can accept objects from server applications

Each object is created in its own specific server application - say, Windows Paintbrush - and is then placed as an object in the client file. This object can be either a link to the server file or a copy of the server file embedded into the client.

The main qualitative difference between OLE and simple cut and paste is that the object can be edited from within the destination file. To edit a graphic placed into a database record, say, the user simply double-clicks the mouse over the graphic and the originating graphics application is opened.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 23 University of Hull

Page 28: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Index__________________________________________________________________________________

Colour

4.1 What is Colour?

Colour is the human perception of the visible portion of the electromagnetic spectrum, the full range of which stretches from low frequency radio waves to gamma rays (Figure 4.1). This visible portion of the spectrum comprises radiation of wavelengths from roughly 380 to 700 nanometres (1 nm = 10 -9m, or 1 billionth of a metre), which we see as a range of colours from violet (360 nm) through blue (480 nm) and yellow (580 nm) to red (700 nm).

10

10

10

10

10

10

10

10

103 km

3 cm

3000 nm

300 nm

30 nm

0.003 nm

0.0003 nm

0.00003 nm

0.3 mmRed

Violet

380 nm

700 nm

Frequency (Hz)Wavelength

Ultraviolet

Radio waves

Microwave

Infrared

X rays

Gamma rays

Cosmic rays

Visible Spectrum

22

21

20

16

15

14

12

10

5

Figure 4.1The Electromagnetic spectrum.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 24 University of Hull

Page 29: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Index__________________________________________________________________________________

4.2 The Human Visual System

The human eye is an extraordinarily sensitive and sophisticated visual system capable of distinguishing very subtle differences in shade and hue. In essence it's a simple mechanism (Figure 4.2).

Cornea

Lens

Fovea(focal point)

Retina

Iris

MuscleVitreous Humor

Optic nerve

Blind spot

Figure 4.2Simplified cross-section of the human eye

Light is focussed on to the sensitive retina at the back of the eye by the flexible lens, the shape of which is controlled by muscles. The retina is composed of two types of light-sensitive cells, rods and cones. Rods function in dim light and are concentrated in the peripheries of the retina: they are responsible for our night sight and are not colour sensitive. Cones contain photopigments rendering them sensitive to colour, but only operate in good light. Rods vastly outnumber the cones over most of the retina with the exception of the focal point of the eye, the fovea (Figure 4.3).

Figure 4.3Schematic cross-section of retina near fovea, showing distribution of rods and cones.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 25 University of Hull

Page 30: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Index__________________________________________________________________________________

4.3 The Perception of Colour and Brightness

Within the visible spectrum our eyes are more sensitive to some wavelengths than others. Broadly speaking we can see yellows and reds rather better than blues and violets, longer wavelengths better than shorter. There are a number of reasons for this:

· the lens and vitreous humor absorb more long wavelengths than short· there are many more red-sensitive cones than green and blue (roughly 65% red,

32% green, 3% blue)· the lens cannot adjust sufficiently to properly focus the shorter wavelength blues

on to the fovea (this is why blues can often appear blurred)

For these physical reasons our perception of colour differences varies according to the position of the colours in the visible spectrum. We find it easier to perceive changes in colour at the red end than at the blue. Moreover, we see reds and yellows as inherently brighter than blues and violets, so that to give the appearance of equal brightness a blue area has to have a greater intensity than a red.

Our perception of a colour's brightness is similarly non-linear. Brightness is our perception of intensity, which represents the energy in the light (the peak, or amplitude of its waveform). Although we can distinguish in the order of 10 billion intensity levels from near-darkness to unbearable glare changes in intensity at low levels result in much greater increases in brightness than the same changes at higher levels. Replacing a 50W bulb with a 100W will create a greater brightness increase than changing the 100W for a 200W even though each increase represents a doubling of intensity.

4.4 Colour Models

A colour classification system based on the physical properties of light is not really suitable to measure the human perception of colour. A colour described as 'EM radiation of wavelength 700nm' would make little sense to most of us, to whom the word 'red' is rather easier to envisage. Moreover, colour mixtures with no one wavelength would be very difficult to describe. Instead, colour models (sometimes known as colour spaces) have been devised based on the concept of colour mixing, whereby 3 primary colours can combine to produce the full colour range. Not only are these more intuitive than purely physical descriptions but they also provide a numerical description of colour that can be used for displays and printing.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 26 University of Hull

Page 31: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Index__________________________________________________________________________________

4.4.1 Additive and Subtractive Colours

We perceive the colours of objects either by the light they emit or the light they reflect. A tomato on television appears red because its image emits red light, whereas a real tomato gets its colour by absorbing all other colours in white light apart from red, which it reflects.

Computer monitors and televisions shine by their own light and produce colours by the addition of differing amounts of primary colours - this is known as additive mixing. On the other hand colour printing uses the concept of subtractive mixing whereby primary coloured inks subtract colour from the incident light. Thus, in additive schemes the combination of the three primaries at full intensity produces white, whereas in subtractive schemes it produces black.

4.4.2 The CIE Diagram

In 1931 the Commission Internationale de L'Eclairage developed the CIE chromaticity diagram (Figure 4.4) based on empirical data gathered on human colour perception, and this diagram has been the baseline for colour modelling since. All of the observable colours are placed in a horseshoe shape between x-y axes so that each colour has unique coordinates. All the visible pure colours (hues, or spectral colours because they occur in the visible spectrum) are to be found on the edge of the curve. The colours occurring inside the curve and on the straight 'purple line' which completes the curve are mixtures of hues. Being 2-dimensional the CIE Diagram cannot show intensity/luminance, but this factor can be derived using simple mathematics.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 27 University of Hull

Page 32: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Index__________________________________________________________________________________

Figure 4.4The CIE chromaticity diagram.

The diagram has a number of useful properties. For example, a line drawn between any two points on the curve defines all the colours that can be derived from mixing those two colours; similarly, finding all the possible mixes of three colours is done by drawing a triangle connecting the three points.

Whilst the CIE Diagram is used extensively by television engineers, more suitable colour models - some of which have been derived from it - have been invented for use in computer graphics.

4.4.3 Red, Green and Blue (RGB)

As monitors and televisions use red, green and blue for primary colours, it is unsurprising that the RGB model is widely used for visual display. This is often visualised as a cube (Figure 4.5).

B lue(0 ,B,0 )

M age nta(R,0,B )

Red(R,0,0)

Ye llo w(G ,R ,0 )

G reen(0,G ,0)

C yan(0,G ,B )

W hite(R ,G ,B )

B lack(0,0,0)

Figure 4.5The RGB cube. (Adapted from Burger and Gillies [1989].)

From a hardware point of view, the RGB model is easy to work with as the different percentages of red, green and blue in a particular colour can be directly mapped to electron gun intensities. It is, though, unintuitive to use: given a particular colour it is not always easy to decide how to adjust the RGB balance in the colour to make it darker or lighter or to add tints of a non-primary colour.

4.4.4 Hue, Light and Saturation (HLS)

HLS uses the more friendly concepts of hue and saturation. Hue is the pure colour as people see it - red, yellow, green - and saturation expresses the relative amounts of pure hue and white in a colour, ranging from 0% (no hue at all, ie grey) to

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 28 University of Hull

Page 33: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Index__________________________________________________________________________________

100% (pure hue). The third factor - light - can be thought of as the brightness of the colour. HLS is easiest to visualise as a diagram (Figure 4.6).

L=1(white)

L=0(black)

Blue(0º)

Magenta(300º)

Red(240º)

Yellow(180º)

Green(120º)

C yan(60º)

Figure 4.6The HLS cone. Saturation increases away from the central axis. (Adapted from Burger and Gillies [1989].)

The hues are defined by their counter-clockwise angle from the benchmark blue line, saturation is the distance from the central axis with 100% saturation (pure colour or hue) at the circle edge, and light is the distance of the circle along the vertical axis. The central axis also represents the greyscale, being the line of 0% saturation.

4.4.5 Hue, Saturation and Value (HSV)

The visualisation of HSV is similar to HLS insofar as hue is measured as an angle and Saturation and Value conceptually correspond with Saturation and Light in the HLS model. However, HSV differs from HLS in both the visual analogy - HSV is conceived as a single cone (Figure 4.7) the top of which marks V = 1 - and in the method of calculating Saturation and Value3.

G reen Yellow

C yan R ed

M agen taB lue

V = 0

V

3 See Burger & Gillies [1989], pp 333-338, for details of the calculation method.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 29 University of Hull

Page 34: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Index__________________________________________________________________________________

Figure 4.7The HSV hexagonal cone. As with HLS, saturation increases away from the central axis. (Adapted from Burger and Gillies [1989].)

HSV and HLS can be simply related arithmetically to RGB values so it is not difficult to translate a shade represented in either of these systems into electron gun intensities for screen display. At least two - RGB and HLS - and often all three can be found in modern graphics packages so that the user has a choice of colour models.

4.4.6 Cyan, Magenta, Yellow and Black (CMYK)

For colour hard copy the subtractive colour model in use is the CMYK system (Figure 4.8). This uses Cyan, Magenta and Yellow as the three primary mixing colours. Whilst theoretically these colours can create black, in practice a pure black pigment is usually included in the scheme in order to print text and to produce deep black fills.

Cyan

Yellow

Magenta

Red

White

Blue

GreenBlack

Figure 4.8The CMY cube.

4.4.7 Other Colour Models

There are a number of variations on the HLS theme, including HSI (Hue, Saturation, Intensity) and HVC (Hue, Value, Chroma). HSI and HVC are based upon the non-linear human perception of colour in contrast to HLS and HSV which are based on the linear manner in which the computer produces colour. Whilst they are more complex mathematically than linear models and therefore make the computer work harder such perception-based models are easier to use from a human standpoint and are likely to supersede the machine-based models over time.

Although not a colour model as such it is worth mentioning the Pantone Matching System used in colour printing. This is a set of standard shades, each shade having a unique shade number and consisting of specified percentages of each of the CMY primaries. This allows colours to be printed consistently by disparate hardware.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 30 University of Hull

Page 35: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Index__________________________________________________________________________________

4.5 The Use of Colour

4.5.1 Lighting and Backgrounds

Different coloured lighting changes the colours of objects which we see by reflected light - this can easily be verified by standing under a sodium street lamp and looking at a colour magazine. This is not a problem in the field of computer graphics as virtually all colour printouts are intended to be viewed in white light, and of course colour monitors luminesce so the display is unaffected by any incident light.

However, the colour of backgrounds affects the appearance of foreground objects. Obviously blue text will have much less contrast against a violet background than against a red (and none at all against a blue!). Less obvious, however, is that a colour on a light background appears to be more saturated than if it were on a dark background. It's also interesting to note that a large area of a colour appears more saturated than a small area of the same colour.

4.5.2 Warm and Cool Colours

As a result both of our non-linear colour perception and of colour associations found in nature it is possible to develop rules for the use of colour. Blue appears distant to our perceptions for physiological reasons (see The Perception of Colour and Brightness above) and is also the colour of the sky and sea. To our eyes, then, it has properties of distance and tranquillity. On the other hand, we perceive red very strongly in comparison to blue and it is also the colour of blood and fire. Not unnaturally we associate it with passion, heat and activity.

A rough division of the visible spectrum can be made into 'warm' and 'cool' colours, warm colours corresponding to long wavelengths (reds, yellows) and cool to short wavelengths (blues, violets). This scheme is usually conceived as a colour wheel (Plate 3).

Colours opposite each other on the wheel (180° apart) are known as direct complements and provide the most vivid and vibrant contrasts. The two colours 30° either side of a direct complement are known as the split complements; using split complements of a colour results in greater harmony than the use of the direct complement, at the loss of some vibrancy and contrast.

The use of colour is a large and complex topic which is dealt with ably in a wide range of works (see the Bibliography). There are, however, a number of simple guidelines that should be borne in mind when using colour, whatever the purpose:

· cool colours are distancing and should generally be used in backgrounds, whereas warm colours grab the attention and are better placed in the foreground

· the eye finds it difficult to focus on short wavelengths, so avoid the use of blues and violets for text and where edges are important

· be sparing in the use of saturated colours - the eye tires quickly when faced with vibrant shades

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 31 University of Hull

Page 36: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Index__________________________________________________________________________________

· bear in mind that colours often have psychological and symbolic associations; this can be particularly important when addressing an international audience as these associations are often very culture-specific.

4.5.3 Colour Deficiency

Sometimes incorrectly termed 'colour blindness', colour deficiency is the result of a minor genetic error which mainly affects men. Roughly 8% of men, and 9% of the population as a whole, exhibit some form of colour deficiency. This ranges from complete colour blindness, which is quite rare, to mild colour insensitivity. The most common deficiency is dichromatism in which the person's retina lacks the green or red photopigment so that they are unable to distinguish red or orange from green or yellow.

Colour deficiency is not usually a problem for the people affected, and indeed some are completely unaware that their colour vision is impaired. They still see a tomato as a shade which they call 'red' even though they may be lacking a red photopigment; problems only arise when they are required to distinguish between colours to which they are insensitive, usually red and green. It is therefore important for designers who use colour to be aware of this and to avoid, for example, using red text on a green background.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 32 University of Hull

Page 37: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Index__________________________________________________________________________________

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 33 University of Hull

Page 38: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

__________________________________________________________________________________

Graphics Hardware

This Chapter considers the hardware issues involved in computer graphics. It explores the sort of hardware required to display, print and scan graphics in microcomputer systems, after having first looked at the question of memory and storage.

Hardware is of crucial importance to graphics, probably more so than software: the cleverest algorithms in the world are of no use if the hardware is incapable of displaying the results. Indeed, it is primarily technical advances in hardware that have brought ordinary users into the field of high quality computer graphics which was previously the sole province of professional designers.

3.1 Memory Issues

Generating computer graphics places great demands on a system in terms of memory, particularly in the case of bitmapped graphics. Until relatively recently, dynamic memory - that is, random access memory (RAM) - has been at a premium in the world of the desktop computer; the original PC XT, for example, only had 1M of RAM, of which only 640k was available for application programs. Similarly, only during the second half of the 1980s did microcomputers acquire large amounts of disk storage space as hard disks became larger, faster, and above all cheaper. A positive feedback cycle exists whereby hardware advances in memory allow more complex software to be written which then encourages the hardware manufacturers to enhance their product, and so on.

The reason why graphical images take up a lot of memory is, simply, because they contain a lot of information. The old saying that "a picture says a thousand words" probably underestimates the information content of a detailed image such as a photograph by one or two orders of magnitude. For example, a colour picture of a landscape may contain information relating to the geology and geomorphology of the scene, the weather and season when the photo was taken, and past and present social, economic and cultural uses of the land. To transfer all the information in an image of, say, Dentdale in the Yorkshire Dales to text would take many pages, even in the most concise writing.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 34 University of Hull

Page 39: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Graphics Packages__________________________________________________________________________________

3.1.1 Memory Requirements of Vector v Bitmapped Graphics

As noted in the previous Chapter, vector-based images require much less memory than bitmaps because they are stored as sets of objects, each object containing other objects and/or graphical primitives, such as lines and rectangles: in effect, a vector graphic is no more than a collection of drawing instructions which can be stored in a relatively small number set. So, the graphic does not store the information about the individual elements of the screen - pixels - but rather the instructions to reconstitute objects: the Olympic flag, for example, would be stored in vector format as:

a rectanglethe top left and bottom right rectangle coordinatesfive circle instructionsthe centre and radius of each circlethe colour of each circle

A bitmap of the flag, however, would contain the value of each pixel in the image, even though much of that data is redundant. In an experiment such an image was drawn and saved in vector and bitmapped formats: the vector file was a mere 315 bytes in size, compared to the 65k the bitmap took up. Of course, the bitmap can be compressed - a PCX file of the same image was only 9k in size - but nevertheless this example illustrates the point that, for images composed of objects the vector graphic format is most appropriate.

3.1.2 Disk Storage

Plainly bitmaps require large amounts of disk space. This is - and has always been - a problem in the field of graphics, which is addressed on two fronts: hardware and software.

On the hardware side, the amount of data that can be stored on magnetic, floppy disk has steadily increased over time until, at the time of writing, 1.44 MB floppy disks are standard and 2.88 MB disks are just emerging. However, magnetic media are no longer sufficient to hold the vast amounts of data required by modern graphically-intensive applications and true colour4 bitmaps, and thus optical media are rapidly coming into their own.

Optical disks use visible laser light to read and write data from and to the disk. The most common optical disk is the CDROM (Compact Disk Read-Only Memory) with a data capacity of around 600MB. CDROMs are rapidly becoming the standard for the distribution of large applications and graphics because of their low production costs, robustness, and the increasing availability of cheap CDROM drives which will certainly become standard on all desktop computers in the very near future. Another read-only optical disk is the WORM (Write Once Read Many times): this is usually used for large-scale archiving, and is unlikely to impact the desktop market for quite some time. Very recently a number of read/write optical and magneto-optical disks

4 This term usually refers to 24-bit colour.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 35 University of Hull

Page 40: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Graphics Packages__________________________________________________________________________________

have arrived promising astonishing data densities - 1.3 Gigabytes on a 5.25" disk! 5 - and one of these new optical technologies may well become a standard in the future6.

Software solutions to the problem of large bitmaps take the form of compression algorithms (see the section on File Compression in the previous Chapter). These are methods of removing redundant data from the bitmap in order to reduce its size and on the whole are very successful: nearly all the common bitmap file formats utilise one or more compression methods. However, the efficacy of compression declines as the complexity of the image increases, unless one is willing to accept some degradation of the picture; nevertheless, compression is an invaluable tool for reducing the majority of bitmapped images to manageable sizes.

3.1.3 Computer Memory (RAM)

For the same reason that they place great demands on disk space, bitmapped graphics also require large amounts of working memory, or RAM (Random Access Memory), both to display the image and to manipulate it. Display memory is known as Video RAM (VRAM), a special fast type of RAM purely dedicated to the video display; this will be discussed in section 3.3 on Video Cards.

For manipulation purposes - editing, adding special effects, etc - the image, or portions of it, are loaded into RAM from disk. Until relatively recently this was a distinct problem as not only was RAM quite expensive in relation to the cost of disk space but many microcomputers had a low limit to the amount of RAM that could be added; however, the cost of memory chips has plummeted sharply in recent years and microcomputer manufacturers now incorporate substantial memory expansion capacity into their products. The average PC or Mac is now capable of handling high-resolution 8-bit (256 colour) images, and for relatively little extra cost can be turned into a full-blown true-colour graphics workstation.

3.2 Monitors

The computer monitor is the most commonly used output device for computer graphics. Virtually all modern monitors in general use build up the picture from horizontal lines running from the top to the bottom of the screen, each line consisting of a series of individual dots. They fall into two categories: Cathode Ray Tubes (CRTs) and Liquid Crystal Displays (LCDs)

3.2.1 CRT Displays

The CRT is probably the most ubiquitous electronic display device of modern times, being at the heart of every television set. Beams of electrons ('cathode rays') from three electron guns are fired through a shadow mask - a sheet of metal with regular apertures which focus the beam - to strike phosphor dots on the screen surface. There are three types of phosphor, as there are three electron guns, one for

5 "A New Phase for the Floppy", Personal Computer World, Vol 16 No 4, April 1993, pp 457-8.6 An early and quite common form of optical disk, still in use today, is the Videodisc. However, this is used to hold

video in analogue form and is unsuitable for storing digital data.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 36 University of Hull

Page 41: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Graphics Packages__________________________________________________________________________________

each primary colour - red, green and blue - and when a phosphor is struck by the electron beam from 'its' gun it emits its characteristic colour. The strength of this emission, that is the luminance of the phosphor, is proportional to the power of the beam, and the combination of the three phosphors at their different intensities produces the colour of the picture element, or pixel. The electron guns build up the picture, or frame, line by line from top to bottom, and each line - or scan - is composed of many pixels. As the dots only phosphoresce for a short time after being struck by the electron beam the screen has to be redrawn, or refreshed, many times a second: for a flicker-free display a refresh rate of 25-30 frames per second is required.

Green

Blue

Red

Red phosphorGreen phosphorBlue phosphor

ScreenShadow MaskElectron Guns

Figure 3.1Colour CRT system

R

G

B

R

G

B

R

G G

B

R

G

B

R

G

BR

G

B

R

G

BPixel

Figure 3.2Arrangement of phosphors on CRT screen

Different colours are produced by assigning different voltages to each electron gun thus lighting phosphors to different intensities, and the colour range a monitor is capable of is determined by how many voltage levels can be supported by the guns. For example, the now obsolete EGA (Enhanced Graphics Adaptor) standard for PC monitors had only 4 levels per gun which could produce 64 colours (4x4x4), although in practice the standard dictated that only 16 colours were available at any one time 7. In contrast, SVGA (Super VGA) allows for 256 voltage levels per gun producing a maximum 16.7 million (2563) colours. Greyscale images - where the colour of a pixel lies in a range from white to black - are produced by assigning the same voltage to each gun so that each colour phosphor shines at the same intensity, resulting in as many shades of grey as there are gun levels.

3.2.2 Liquid Crystal Displays

LCD systems use long crystalline molecules ('liquid crystals') which change their position when an electric field is applied. An LCD display consists of a thin layer of liquid crystal sandwiched between two densely-packed sets of thin wires, one

7 EGA allocated only 4 bits per pixel which meant that, at any one time, one gun had 2 bits (4 levels) and the others had 1 bit (2 levels) apiece, allowing only 4x2x2=16 colours.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 37 University of Hull

Page 42: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Graphics Packages__________________________________________________________________________________

horizontal and one vertical (Figure 3.3). Together these wires form an interlocking grid, each intersection representing a dot on the display. This sandwich is in turn sandwiched by two polarising filters, again one horizontal and one vertical. The display is created by matrix addressing whereby each dot is addressed in turn by passing a current through each horizontal and vertical wire in sequence, and whenever the combined currents at an intersection are sufficiently strong the resulting electric field moves the crystals at that point so that when seen through the polarising filters they are opaque - that is, the dot becomes dark.

Figure 3.3Elements of a Liquid Crystal Display. (Adapted from Foley et al [1990].)

Modern liquid crystal displays are backlit by an integral light source as displays which depend upon incident light perform poorly in low light environments, as well as being prone to reflection in bright environments which obscures the display.

Colour LCDs operate on the same principle of molecules changing their orientation under electric fields but use three liquid crystal layers - one each for red, green and blue - and coloured polarising filters to generate a palette of colours.

LCDs are capable of very high resolutions and of course require very little power, and are used in devices where a high-voltage CRT is inappropriate, such as portable computers and hand-held televisions.

3.2.3 Video Display Standards

Whilst there have been a plethora of display standards in the PC world, at the time of writing the most common are VGA (Video Graphics Adaptor) and SVGA. VGA allows for 16 colours at 640 x 480 resolution, or 256 at 320 x 200. The SVGA standard encompasses any display that is superior to VGA and allows for a number of permutations of resolution and colour, from the maximum 1280 x 1024 x 16.7M to the minimum of 640 x 480 x 256. It should be added, however, that many of the cheaper monitors achieve the maximum SVGA resolution by a technique known as interlacing, whereby every other line on the display is drawn in each frame - rather than every consecutive line, as is normal - meaning that it takes two complete scans to

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 38 University of Hull

Page 43: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Graphics Packages__________________________________________________________________________________

create a picture. The disadvantage of this is that the frame rate - the number of frames per second - is halved and this can lead to perceptible screen flickering.

It is important to note that these standards are independent of the physical size of the monitor: SVGA has the same resolution and colour depth regardless of whether the monitor is 14" or 21". For this reason it is often a good idea for users who constantly work at high resolutions (800 x 600 or better) to obtain large monitors, particularly if their work involves Desktop Publishing: a letter which is, say, 10 pixels vertically will look illegibly small on a 1024 x 768 display on a 14" monitor but will be perfectly readable at the same resolution on a 21".

PC monitors operate in either text mode or graphics mode. In text mode - the default - graphics cannot be output and text is displayed on screen in a standard font using a hardware character generator. In order to display graphics the monitor has to be switched by software into graphics mode. These modes are normally invisible to the user as graphics applications switch into graphics mode upon startup, but they do need to be borne in mind by programmers.

There is no equivalent in the Apple Macintosh world of the discrete PC graphics standards. Macs were designed from the outset to be graphical, unlike PCs which were originally text-only displays, and have consistently led PCs in terms of graphics capabilities; only very recently has the PC monitor attained parity with that of the Mac.

3.3 Video Cards

Given that present-day monitors are capable of high-resolution true colour, the only restricting factors for graphical displays are:

· the amount of memory available for the display· the speed at which the display 'redraws' itself.

These factors are controlled by video cards. These are add-ons to the microcomputer, printed circuit boards with on-board memory (VRAM) and/or processors which go into expansion slots in the machine and enhance its existing graphics capability. Indeed, in the early days of microcomputing, video cards were necessary to display graphics at all, but as time went on the function of the cards was built into the motherboard (the main circuit board of the computer) so the add-ons were purely for enhancement of the built-in graphics standard. (At the time of writing, PCs come with on-board VGA capability, but this will surely become SVGA in the near future.)

The extra VRAM makes it possible to display wider colour ranges and resolutions than the on-board graphics hardware is capable of. Memory is crucial in determining these ranges because even though the monitor may be capable of displaying high-quality images it will only do so if enough memory is allocated to the display to hold the required picture information.

However, extra VRAM alone does not always make a satisfactory graphics workstation as memory takes time to be read by the computer. Watching a high-resolution true-colour image being read from the framestore (a synonym for VRAM) and drawn on screen is a tedious experience at the best of times. When the screen has to be redrawn frequently - as is the case with a Graphical User Interface such as

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 39 University of Hull

Page 44: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Graphics Packages__________________________________________________________________________________

Microsoft Windows, where simply switching from one window to another forces a redraw - then the computer becomes unacceptably slow and users become frustrated and lose time. The solution to this problem is to place another processor on to the video card itself, thus relieving the computer's processor of the burden of the graphics display. An accelerator card, as it is known, speeds up high quality displays considerably, although of course it costs rather more than a standard video card.

3.4 Colour Printers

3.4.1 Problems of Colour Printing

Putting a colour image on screen is somewhat easier and cheaper than placing it on paper. There are a number of technical problems associated with colour printing which have to do with colorimetry (colour science), physics, chemistry and even human physiology and the psychology of perception. Fortunately, it is not necessary to go into tedious technical detail in order to outline the major problems that beset the transfer of colour screen images to hard copy. These include:

Different colour coding schemesScreen colours are additive, the colour of a pixel depending upon the differing intensities emitted by its red, green and blue phosphors: the screen shines by its own light. Printed colours are subtractive as the colour of an ink depends upon the wavelengths it absorbs from the incident light: red ink appears red because it absorbs - subtracts - light of all the wavelengths other than those in the red part of the visible spectrum, which it reflects. Additive and subtractive colour schemes use different colour models, so colours have to be translated from one scheme to the other for faithful rendition from screen to page. (See the following Chapter on Colour.)

Different display resolutionsPrinter resolutions are usually better than screen resolutions: a typical colour printer will be capable of 300 dpi (dots per inch) horizontal resolution whereas the monitor might only be capable of, say, 64 dpi. This means that a printed image of the same resolution is smaller than the screen image, so to print at screen size the image has to be enlarged. This can be a problem with bitmaps as extra pixels have to be created by a process called interpolation which can lead to blockiness and 'staircasing' of lines.

DitheringBasic mixing of the three primary colours in the CMYK scheme - Cyan, Magenta and Yellow (black is not used for mixing) - used in colour printing only produces 8 colours, so with the exception of high-end products colour printers have to use dithering to achieve a wide colour range. Dithering involves printing varying proportions of dots of the 8 colours in a square dither matrix - usually 4 x 4 or 2 x 2 dots - to give the appearance, from a normal viewing distance, of another colour. The main disadvantages of this

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 40 University of Hull

Page 45: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Graphics Packages__________________________________________________________________________________

method - aside from the inherent complexity of the various dithering algorithms - are increased memory and processing overhead and a reduction in resolution; a 300 dpi printer using a 4 x 4 matrix only has an effective resolution of 75 pixels per inch.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 41 University of Hull

Page 46: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Graphics Packages__________________________________________________________________________________

ChemistryThe chemical composition and physical properties of inks and papers are of crucial importance in colour printing. The formulation of the ink is most important as users increasingly demand to be able to use normal office paper rather than special papers. Among the properties of the ink that need to be carefully controlled are its miscibility, viscosity, surface tension, pH, dielectric properties and optical density. Synthesising printer inks is not an easy task.

It is not really necessary to outline the other problems in colour printing in order to make the point that it is an expensive and complicated business. Whilst these problems are mostly solved before the final product hits the market an understanding of them goes a long way to explaining why the user can never count on the printed image looking exactly as it did on screen and why colour printers are so dear.

High-quality colour hard copy can also be achieved photographically, images from the screen being placed directly on to film. This method bypasses the problems of ink and paper chemistry by using familiar and well-tried photographic technology, but has the disadvantages of relatively long development times - in comparison to the few minutes it takes to print an image to ordinary paper - and expense. Colour film, however, enables much higher resolution and colour depth than can currently be achieved on plain paper and is the preferred method for those users requiring the highest quality colour hard copy.

3.4.2 Types of Colour Printer

Colour printers come in a number of types. These are, in rough order of cost from cheapest to dearest:

• dot matrix• inkjet• thermal wax• dye sublimation• laser

In dot matrix printers tiny pins strike the paper through a multicoloured ribbon containing the CMYK primaries to produce a coloured dot. The pins are gathered together in a matrix inside the printhead, which can consist of 9 or 24 pins, a 24-pin dot matrix producing better results than a 9-pin. Such printers are really only suitable for coloured text: printing fills - blocks of solid colour - results in horizontal streaks and considerable paper distortion from the multiple pin impacts. They are also very slow, as the printhead takes four passes to print a line, and very noisy, but they have the saving grace of being cheap.

Inkjet printers produce an image by spraying individual, very fine drops of ink at the paper from inkwells of the four primaries. Such devices are capable of producing good quality, low-cost colour prints quickly and quietly, and at a not excessive cost. The main disadvantages of inkjets are that colours can sometimes look 'muddy' or 'washed out' because of inks mixing at dot edges.

Thermal wax technology uses a thermal print head to melt wax from a multicoloured ribbon on to the paper. Ironically, because this eliminates the flow of

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 42 University of Hull

Page 47: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Graphics Packages__________________________________________________________________________________

ink over dot edges it can often produce a grainy picture, although the colour quality is superb. Many thermal wax printers can work with good quality office paper, by the simple expedient of placing a special coating on the sheet during the printing process to produce a smooth printing surface.

Dye sublimation printers also use coloured ribbons with a thermal print head, but instead of melting ink on to paper the print head vaporises the ink which then condenses on to special paper very close to the ribbon. By this method the size of the dots can be controlled and the primary colours can be blended together, doing away with the need for dithering. This is a qualitative improvement over other printing technologies and produces very high quality continuous tone (not composed of dots) output, its main disadvantage being the high cost of consumables (ink and paper).

Colour laser printing works by using a laser and a photosensitive drum to place electrostatic charges on the paper corresponding to the printing positions: when the paper is taken through a colour toner reservoir the magnetically-charged toner is attracted to the paper as dust and is later heat-bonded to fix it. The results, on the very best printers, are indistinguishable from photographs, and unsurprisingly such machines are very expensive; however, because they can print to ordinary office paper the cost per print is low.

Less common devices are colour plotters - both pen and electrostatic - which are extensively used in Computer-Aided Design (CAD) and scientific disciplines such as meteorology where a relatively small colour range is sufficient and large printouts are required; the average office or home user is unlikely to come across these devices.

3.5 Limitations of Colour Output

Computer graphics technology is still far from the point where the full range of visible colours can be rendered either on screen or on paper. The main reason for this is that neither monitors or printers are yet capable of producing totally pure primary colours. Figure 3.4 shows the approximate colour range of current monitors within the CIE chromaticity diagram (see the following Chapter on Colour).

Figure 3.4Realisable colours on a typical colour monitor, in relation to the full range of visible colours.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 43 University of Hull

Page 48: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Graphics Packages__________________________________________________________________________________

3.6 Colour Scanners

Scanners are used to digitise an image on paper, photographic negative, or slide into a bitmap. This is accomplished by passing light containing a known set of wavelengths - usually similar to daylight - over the image and receiving that light in photosensitive semiconductors known as Charged Coupled Devices (CCDs) which emit voltages proportional to the intensity of the light falling upon them. The image is scanned using red, green and blue filters either using three CCDs - one per primary colour - or one, in which case each scan requires three passes to view the image under the three different filters. Naturally, scanners with three CCDs are more expensive than those with only one, but as they only require one pass to scan an image are obviously faster.

There are two types of hard copy scanner: hand-held and flatbed. Hand-held scanners contain a light source and CCDs and pick up the image by being swept down the page; if the image to be scanned is wider than the scanner head the process is repeated across the page and the resulting strips are 'stitched together' by software inside the computer. With flatbed scanners the paper is placed on a glass surface and the light is moved over it in a similar way to a photocopier. Hand-held scanners are cheaper than flatbeds but the latter come into their own when most of the images to be scanned are page-sized. Scanning resolution and colour depth varies from 256 colours (8-bit) at 300 dpi to 16.7 million colours (24-bit) at 1200 dpi for high-end products. The crucial factor, as ever, is cost.

Flatbed scanners can be used to scan photographic slides and negatives, but this is usually performed with specialised scanners known as Film Recorders which scan at higher resolutions than hard copy scanners, typically up to 3048 x 2072 pixels in 24-bit colour (» 3000 dpi).

What are Computer Graphics?

This Chapter looks at the nature of computer graphics and considers the issues related to the storage of computer graphics in memory and on disk, including the important topics of image compression and graphics file formats.

2.1 The Nature of Computer Graphics

A computer graphic is really nothing more than an image represented by a computer, usually on screen and sometimes on a printout. The image may come from the real world - such as a photograph or a drawing that has been digitised (converted into computer-readable form) - or it may have been generated in a computer using

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 44 University of Hull

Page 49: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Graphics Packages__________________________________________________________________________________

graphics software. In essence, a computer graphic is no different from an ordinary picture on paper, at least in appearance; however, being stored in digital form bestows many advantages on an image. It can be:

· copied freely and stored safely on disk· distributed with ease, either on disk or by data transmission along

communications lines· manipulated in literally hundreds of different ways by software· incorporated into documents such as reports and publications (Desktop

Publishing, or DTP)· archived in image libraries· output to a wide variety of devices, particularly monitors, TVs and printers

The vast majority of the images we see today - in books or magazines, on advertising hoardings, on television - are, or at some time have been, computer graphics. All graphics fall into two broad categories: vector graphics and bitmapped graphics, the difference between the two being the method of storing the image data.

2.2 Vector Graphics

Vector images are composed of objects. All objects are built up from primitives - basic drawing instructions such as line, rectangle and ellipse - and objects may be grouped together to form new composite objects to form an object hierarchy. Consider, for example, a picture of an aircraft in vector format (Figure 2.1).

Figure 2.1 Figure 2.1aVector image of aircraft Partially disassembled vector image

At its simplest level it is composed of primitives such as circles, lines and rectangles; however, it can also - and more usefully - be represented as a collection of objects (wheels, engines, wings, doors, etc - Figure 2.1a) which can be composed of primitives and objects. So, for instance, the wing object is composed of component objects (ailerons, flaps, engine) which in turn contain other objects (the engine contains a propeller, fuel feed, etc) and so on down the hierarchy until primitives are reached. The wing object itself, of course, is part of the overall aircraft object. In a drawing package objects can be aggregated and disassembled at will, giving the designer of the graphic considerable flexibility.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 45 University of Hull

Page 50: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Graphics Packages__________________________________________________________________________________

2.2.1 Advantages of Vector Graphics

Vector graphics are highly flexible in terms of image manipulation: they can be resized in any direction and to any magnitude without loss of quality (although if scaled by different amounts in the horizontal and vertical directions some distortion of proportion will occur) and their constituent objects and primitives may also be scaled or moved at will. Vector images are also very cheap in terms of memory as the image data is simply a set of graphical instructions to the computer - eg line(x1,y1,x2,y2), circle(x,y,radius) - together with their parameters (or operands) - x1, y1, radius - and any associated colour data, all of which is coded as a small set of numbers which take up very little disk space, enabling a complex image to be stored in a file only a few tens of kilobytes in size.

2.2.2 Disadvantages of Vector Graphics

All vector graphics are computer-generated - by definition - and thus are rarely, if ever, truly accurate representations of real-world objects. It would be extremely impracticable - and in all likelihood impossible - to draw a vector image of, say, an oak tree which incorporated all the whorls and knarls within the trunk and the intricate structure of branches. It would certainly be possible to draw a schematic oak to show that all oaks have similar overall shapes, the same leaf and the same fruit and often this would be all that was necessary, but it would contain only a fraction of the visual information present in a photograph of a particular oak8. Similarly, whilst a vector image of the Mona Lisa would be recognisable as a representation of Leonardo's work it would not be capable of storing the level of detail that exists in the original portrait.

2.2.3 Uses of Vector Graphics

Vector graphics find their metier in technical areas such as CAD/CAM (Computer-Aided Design/Manufacture), scientific modelling, and architecture where the ability to manipulate parts of a graphic - moving, copying, deleting, resizing, etc - is of high importance. Vector graphics are also increasingly being used in the 'graphic art' world, with the advent of sophisticated off-the-shelf vector-based graphics applications such as Corel Draw! and Harvard Graphics.

2.3 Bitmapped Graphics

Bitmaps - sometimes known as raster graphics - are images composed of discrete dots known as picture elements or pixels (Plates 1, 1a), each of which can be any colour within a specified range of colours. Bitmaps can be created on the computer but most are real-world images in digital form, such as satellite photographs.

8 Advanced graphics packages allow the 'vectorisation' of bitmapped images so that the photo of the oak could be traced into a vector form. Nevertheless, the real-world image is still created outside the computer.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 46 University of Hull

Page 51: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Graphics Packages__________________________________________________________________________________

2.3.1 Resolution and Colour in Bitmaps

The resolution of a bitmap is determined by its horizontal and vertical dimensions measured in pixels. Thus a 640 x 480 bitmap displayed on a standard VGA monitor will look better than a 320 x 200 bitmap displayed in the same area, although it will be inferior to a 1024 x 768 bitmap. The simple principle is that the greater the number of pixels per unit area the better the resolution and the fewer visual imperfections in the picture.

The colour depth9 of a bitmap is determined by the amount of memory allocated to each pixel. Once again, there is a simple principle, which is that the number of colours that can be displayed is given by 2 to the power of the number of bits available per pixel. With 4 bits (a ‘nibble’!) per pixel there are a possible 24 = 16

colours, with 8 bits (a byte) a possible 28 = 256 colours, and the most natural-looking results are obtained with 24-bit colour which can display up to 224 = 16.7 million colours per pixel. Naturally, high-resolution bitmaps can only be displayed in their full glory on appropriate hardware with sufficient video card memory (video RAM, or VRAM - see Chapter 3). However, it is usually possible to display any resolution of bitmap on the humblest 16-colour systems (such as the base VGA standard) although of course the greater the gap between image resolution and system capability the greater the degradation in image quality.

2.3.2 Advantages of Bitmaps

The bitmap format is ideal for detailed art and real-world images. Bitmaps can potentially store immense amounts of information (as reflected by the large file sizes) and can be edited in great detail, even to adjusting the colour of individual pixels. Artistic brush and smear effects can be applied to simulate 'real' painting.

Quite sophisticated effects can be achieved on bitmaps with the right software. Image Processing (IP) techniques can be applied to sharpen or smooth details, adjust contrast and brightness, apply different coloured filters to the image, detect edges and thresholds, remove noise, and so on. This sort of image enhancement is frequently used by, say, geologists or archaeologists on aerial or satellite photos in order to reveal structures on the ground, and such advanced IP tools are now available to ordinary users of graphics packages.

2.3.3 Disadvantages of Bitmaps

It is difficult to resize bitmaps without image degradation or information loss. Enlarging a bitmap means that new pixels have to be created so as not to leave blank spots, and the colour of each new pixel is commonly based on the colour of its neighbours - this usually results in a blocky, unnatural appearance (Plate 2).

Reducing a bitmap involves discarding pixels, which necessarily results in loss of information and detail. As with vector images distortion will also occur if the image is not scaled equally in the horizontal and vertical dimensions because the

9 Sometimes known more technically as the number of bit planes.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 47 University of Hull

Page 52: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Graphics Packages__________________________________________________________________________________

elements of the picture will no longer be in the proper proportion to each other (Plate 2a).

Bitmaps can be quite expensive in terms of memory as the value of each individual pixel is recorded: the size of the bitmap in bytes is the product of the horizontal and vertical dimensions (in pixels) and the number of bytes per pixel. For example, a 256-colour (ie 1 byte/pixel) bitmap of dimensions 640 x 480 pixels (the same size as a standard VGA monitor) will take up 640 x 480 x 1 = 307,200 bytes. As the colour depth of the image is improved so does the memory requirement: a 'true colour', 24-bit (ie 3 bytes/pixel) image (such as a photograph) of the same size will take up 3 times as much memory, or 921,600 bytes. Moreover, 640 x 480 is quite a low resolution for the human eye, and truly realistic images can require resolutions in the region of 3000 x 2000 x 24-bit » 18MB of data.

2.3.4 Lookup Tables, Colour and Greyscale

Pixels have numerical values associated with them, and when these numbers are interpreted by a display system - a monitor, or a printer, say - particular colours are produced. The values are interpreted as different intensity levels for each of the three electron guns of a monitor - red, green and blue. With a 24-bit system one byte (8 bits) is allocated to each gun, allowing 28 = 256 intensity levels for each primary colour, and three bytes - representing the levels for each gun - make up a pixel.

The full range of colours available on a display system is known as its palette, but often only subsets of the palette are desirable or even possible. In high-end true-colour systems the user may wish to restrict the range of colours available for different types of work - pastel shades for artistic work, or saturated colours for presentations, say - and in less expensive systems the realisable colour range is usually smaller than the palette. To enable these subsets to be used a Lookup Table (LUT) is kept in memory comprising as many entries as there are pixel values, each entry containing a value corresponding to a screen colour (Figure 2.2).

4747

136

Pixel in Video Memory(Framestore)

Lookup Table Monitor

Pixel of colour 136

46135

48137

0

255

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 48 University of Hull

Page 53: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Graphics Packages__________________________________________________________________________________

Figure 2.2Colour Lookup Table in 256-colour (8-bit) display system

The pixel value in the image is used as an index into the LUT, so that a pixel of value 47 would cause the colour in the 47th entry in the LUT to be displayed rather than colour number 47 - in the example shown in Figure 2.2 this would be 136. Both the values in the entries and the entry point to the LUT can be changed at will which can result in very different colours being displayed with the same pixel values: in this way the visual appearance of an image can be changed without altering the actual image data. LUTs are used extensively in graphics applications both to enable user-defined colour subsets (which, confusingly, are usually called 'palettes') and for special effects.

Because pixels are only represented by values, there is no reason why they should display colour at all when it is not necessary. Often, for scientific purposes, colour is an artificial distraction, and it can be more informative to see an image in greyscale, where the different pixel values are interpreted as lying on a monochrome scale ranging from pure white to pure black; satellite data is often recorded and manipulated in greyscale. Whilst colours are sometimes added to enhance certain features of the image to the human eye these are purely artificial and the result is known as a false colour image.

2.4 File Compression

As bitmaps followed hardware advances in becoming more colourful and detailed, so the mushrooming memory requirements for these images spurred the development of file compression methods. Compression is the process of eliminating redundant data in a file so as to reduce its size, and advances in compression techniques have taken on crucial - if not determining - importance as the field of computer graphics has advanced into true-colour, high-resolution images and moving video. It would, for instance, be practically impossible to store video sequences on disk without sophisticated file compression techniques being applied to the data10.

There are a wide range of compression algorithms in use today, with more being developed every year, which are not only used for graphics files but also for 'ordinary' data and program files. It is now commonplace for commercial applications to be distributed on disk in compressed form. The subject of data compression is large and often highly technical and is of little interest to ordinary users of graphics, who are only concerned that their images be reduced to a manageable size. However, consideration of two of the simplest and most common compression methods used in the field of computer graphics will illustrate the redundancy to be found in many bitmapped images and the advantages of compression.

2.4.1 Run Length Encoding (RLE)

Consider a - 256-colour, for convenience - bitmap, large areas of which are the same colour. The 'raw' method of storing such an image is to allocate one byte per pixel, that byte containing the numerical value of the pixel, (58, say); thus, a 640 x

10 A 100MB hard disk would only be able to hold 13 seconds of full-screen, full-motion video, and a 600MB CDROM would be filled by 78 seconds.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 49 University of Hull

Page 54: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Graphics Packages__________________________________________________________________________________

480 pixel bitmap would be stored as 640 x 480 x 1 = 307,200 bytes. However, in images with uniform areas of colour - that is, adjacent pixels having the same value - a more efficient storage method is to find sets of adjacent pixels of the same value and store each set as a pair of bytes, one byte of the pair being the number of pixels in the set and the other the pixel value. For example, consider the following sequence of pixels from a bitmap:

57 57 57 57 57 57 110 110 110 132 55 200 200 200 200 200 200 200 200 200 200

Ordinarily, these 22 values would require 22 bytes for storage; however, using RLE they can be encoded as follows:

{5,57} {2,110} {0,132} {0,55} {9,200}

That is, 6 - computers count from zero! - bytes of 57, then 3 of 110, then 1 of 132, then 1 of 55, then 10 of 200, and so on. Note that RLE has reduced the data from 21 to 10 bytes, a reduction of over 50%, and reductions of 90%+ are possible with suitable images. The downside to RLE is that, when used on complex bitmaps where adjacent pixels are rarely the same colour, it can actually produce a larger file.11

2.4.2 Huffman Coding

This is a statistical compression method based on the frequency of occurrence of pixel values. The bitmap is analysed to produce a table consisting of each value and the number of times it occurs, then binary codes are allotted to each value such that the shortest codes belong to the most frequently occurring values. For example, the following table might represent the first four rows of a frequency analysis of a bitmap:

Pixel Value Frequency of Occurrence Code (binary)54 132 022 84 01112 57 10243 33 11

Once the analysis is complete, the pixel values are replaced by the binary codes, so the following sequence might be replaced by the bit sequence below it:

112 243 243 54 54 54 22 22 10 11 11 0 0 0 01 01

thus replacing an 8-byte sequence with a stream of 13 bits (1011110000101), an 80% compression. Huffman coding works best with bitmaps with a small range of values; the larger the range the larger the binary code to represent each value, until the situation is reached where the code is bigger than the value.

11 RLE is used by the PCX file format, and an interesting experiment in the efficacy of the compression can be carried out by opening BMP files - which contain raw, uncompressed image data - in Windows Paintbrush, saving them as PCX files, then comparing the different file sizes for the same image.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 50 University of Hull

Page 55: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Graphics Packages__________________________________________________________________________________

2.4.3 Other Compression Methods

More complex methods include LZW (Lempel-Ziv-Welch), DCT (Discrete Cosine Transform) and the intriguing Fractal Compression which reduces complex, real-world images (such as photos) by decomposing them into 'fractals' (objects with 'fractional dimensions') which can be described by matrices of numbers called affine transformations12.

2.4.4 Lossless v Lossy Compression

All of the compression methods described thus far are lossless - that is, no image data is lost during compression. Lossy methods also exist, which rely on the inability of human eyes to spot slight image degradation, and thus trade some slight data loss for efficiency and greater compression; the JPEG method (see next section) allows for 'lossy' compression of images which are to be viewed by people, rather than processed by computers.

2.5 Graphics File Formats and Standards

There are a bewildering plethora of methods by which graphics may be stored and/or compressed, and this is reflected in the large number of graphics file formats available. This used to be a major headache for computer users who wished to incorporate graphics into their work, whether they were applications programmers or secretaries, because in the early days of computer graphics these formats were incompatible. A graphic produced in one drawing package couldn't be imported into another drawing package which didn't support the particular format that the creating package used unless an - often temperamental - conversion program was employed.

This situation created great pressure both for the development of common graphics standards and for applications programmers to build a wide variety of graphics filters (conversion utilities) into their applications. Whilst there are still a large number of formats tied to particular products (eg Corel Draw! .CDR files) Table 2.1 below lists the most common formats which are largely independent of particular packages:

Bitmap VectorBMP (Windows Paintbrush) CGM (Computer Graphics Metafile)GIF (Compuserve Graphics Interchange

Format)DXF (Computer-Aided Design)

MAC (MacPaint - monochrome only) WMF (Windows Metafile)13

PCX (PC Paintbrush)PICT (Macintosh)

12 A detailed description of fractal compression can be found in Peterson[1988], pp 128-13213 Whilst this format is dependent upon the Microsoft Windows environment it is independent of any particular

Windows application.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 51 University of Hull

Page 56: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Graphics Packages__________________________________________________________________________________

TGA (Targa - 24-bit)TIFF (Tagged Image File Format)JPEG (Joint Photographic Experts Group)

Table 2.1Common graphics file formats

Although formats such as PCX and TGA were designed for particular products (PC Paintbrush and the Targa video card respectively) they have gained widespread acceptance in the marketplace; others, such as CGM and TIFF, were designed by groups independent of particular firms, and have been approved by the ISO (International Standards Organisation). New formats are constantly being developed by both companies and bodies to cater for the rapid advances in graphics-related hardware and software, an example being MPEG (Motion Picture Experts Group), designed for digital moving video14.

Graphics can also sometimes be found in Postscript (.PS or .EPS) format. Postscript is a page description language created by Adobe which has rapidly become a printer standard. Each Postscript file is essentially a computer program which tells a printer fitted with a Postscript reader how to print the page. A Postscript file created in any application can be printed on any output device with a Postscript reader, and this independence from particular hardware or software makes it an ideal general format. Postscript comes in a number of variants - Level 1, Level 2, Encapsulated, and Display - and is most often used for documents mixing text and graphics; it is not the ideal format for storing image data alone, particularly in bitmap format.

The user might wonder what differentiates these formats. This book is not intended to cover the highly technical differences between formats (the interested reader is directed towards Rimmer[1990] and Kay and Levine [1992]) which are normally invisible to the user: often, it will make little odds whether, say, a bitmap is stored as PCX or TIFF. There are, however, general points which should be born in mind:

· BMP files, unlike nearly all other bitmapped formats, are not compressed so in the majority of cases a BMP file will be larger - often substantially so - than, say, a PCX file containing the same image. This is obviously disadvantageous in terms of disk space, but can be a plus when viewing bitmaps on a slow computer, as viewing a compressed file requires the computer's main processor to work on the decompression.

· Of the above formats, only PICT and DXF are unable to support 24-bit colour.· TIFF files can come in different 'flavours' - that is, some applications add little

'tweaks' to the TIFF files they generate which can make them unreadable to other applications - this is inherent in the design of TIFF, which contains a number of 'hooks' onto which new methods of encapsulation or compression of graphic data can be attached. Applications written prior to any new methods may thus be unable to read more up-to-date TIFF files. Similarly, the JPEG format contains a number of options which can result in readability and compatibility problems

14 Indeed, the whole area of graphics standards and formats is being increasingly regulated and formalised under the umbrella of the ISO. Now, developers of graphics packages are under pressure to build their applications according to international standards: GKS (Graphical Kernel System) and its successor PHIGS (Programmer's Hierarchical Interactive Graphics System) are prominent examples of these standards.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 52 University of Hull

Page 57: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Graphics Packages__________________________________________________________________________________

This plethora of standards has spawned a large number of file conversion utilities, enabling users to convert, say, a PCX file to TIFF: although many of these utilities are of dubious quality, they do have the advantage of usually being in the public domain, either as freeware or shareware.

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 53 University of Hull

Page 58: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

Graphics Packages__________________________________________________________________________________

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 54 University of Hull

Page 59: Graphics Deliverable - NIU College of Educationlockard/dk555/computergraphics.doc · Web viewDisadvantages of Vector Graphics 4 2.2.3. Uses of Vector Graphics 5 2.3. Bitmapped Graphics

__________________________________________________________________________________

_________________________________________________________________________________________________________Understanding IT: Computer Graphics 55 University of Hull