Computer Graphics • Graphics software allows users to create and edit graphics • Graphics can be divided into 2 types: • Bitmap (Raster) Graphics • Vector Graphics
Pixel Bitmap Graphics • A bitmap graphic is represented by a dot pattern • Each dot is called a Pixel (picture element) • A pixel has a single color only
Vector Graphics • A vector graphic is divided into objects • Each object is defined by the method of drawing it This picture contains 3 objects:a line, a circle and a rectangle
Fill color Radius Line color Line thickness Center How to draw the circle? • The circle is represented by a mathematical formula: Circle(50,100,150,black,1,green) A few bits is enough to save the properties of this circle!
Advantages of using Vector Graphics: • It requires less storage space • When a vector graphic is enlarged, it remains intact (no distortion) Enlarging a Vector Graphic The line is as smooth as before Enlarging a Bitmap Graphic The line thickened & saw-tooth resulted
Disadvantages of using Vector Graphics: • Vector graphics cannot look as realistic as bitmap pictures.
Common Graphic File Format Bitmap (.bmp) - a common graphic file format;can be read by almost all programs Gif (.gif) - a compressed bitmap file format. It can support up to 256 colors Jpeg (.jpg) - a lossy compressed bitmap file format. But it can support up to 16.7 million colors (because it applies lossy compression, some of the details is lost!)
Jpeg Format (5kB) Gif Format (26kB)
Creating Graphics • Painting Software • Drawing Software • Presentation Software
Painting Software • A painting program creates an image by setting the colors of individual screen pixels. • The pictures created by a painting program are thus bitmap graphics. • Example: Paintbrush, PhotoImpact
Drawing Software • A drawing program generates formulae to represent the objects drawn by users. The pictures created are thus object-oriented graphics. • In using a drawing program, you are provided with a variety of drawing tools. • Example: Corel Draw and Powerpoint.
Presentation Software • A presentation program is a drawing program that help users to prepare the essential components of a presentation - presentation outlines, slides, audience handouts and speaker’s notes. • Users can also use a presentation program to run an on-screen slide show. • Example: Microsoft PowerPoint.
Importing Graphics • Clip Art Library • Image Scanner • Screen Capture Outputting Graphics • Printer • Plotter