You are on page 1of 14

FUNDAMENTALS OF MULTIMEDIA GRAPHICS & IMAGES, GITONGA MUNYI ©2020

COMPUTER GRAPHICS

Computer graphics is an art of drawing pictures on computer screens with the help of
programming. That is, computer graphics is a term used to refer to computer-generated images
created with the help of specialized graphical hardware and software. In other words, we can say
that computer graphics is a rendering tool for the generation and manipulation of images. The
picture or graphics object may be an engineering drawing, business graphs, architectural structures,
a single frame from an animated movie or a machine parts illustrated for a service manual.
Computer graphics is responsible for displaying art and image data effectively and meaningfully
to the consumer. It is also used for processing image data received from the physical world.
Computer graphics development has had a significant impact on many types of media and has
revolutionized animation, movies, advertising, video games, and graphic design in general.
Generally speaking, the term computer graphics refers to several different things:
▪ The representation and manipulation of image data by a computer
▪ The various technologies used to create and manipulate images
▪ The sub-field of computer science which studies methods for digitally synthesizing and
manipulating visual content.
In computer graphics, pictures or graphics objects are presented as a collection of discrete picture
elements called pixels. The pixel is the smallest addressable screen element. It is the smallest piece

Page 1 of 14
FUNDAMENTALS OF MULTIMEDIA GRAPHICS & IMAGES, GITONGA MUNYI ©2020

of the display screen which we can control. The control is achieved by setting the intensity and
color of the pixel which compose the screen. Each pixel on the graphics display does not represent
mathematical point. Rather, it represents a region which theoretically can contain an infinite
number of points.

NB: Pixel is the smallest graphical picture or unit represented on the computer screen.

Glossary of terms.
Animation. A sequence of images that, when displayed quickly one after the other, will produce
the impression of continuous motion or change. The term animation also refers to the process of
creating such image sequences.

Page 2 of 14
FUNDAMENTALS OF MULTIMEDIA GRAPHICS & IMAGES, GITONGA MUNYI ©2020

Antialiasing. A technique used to reduce the jagged or "staircase" appearance of diagonal lines,
text, and other shapes that are drawn using pixels. When a pixel is only partly covered by a
geometric shape, then the color of the pixel is a blend of the color of the shape and the color of the
background, with the degree of blending depending on the fraction of the pixel that is covered by
the geometric shape.

Coordinate system. A way of assigning numerical coordinates to geometric points. In two


dimensions, each point corresponds to a pair of numbers. In three dimensions, each point
corresponds to a triple of numbers.

Page 3 of 14
FUNDAMENTALS OF MULTIMEDIA GRAPHICS & IMAGES, GITONGA MUNYI ©2020

Jaggies: A slang term used to describe the stair-step effect you see along curves and edges in text
or bit-mapped graphics. Anti-aliasing can smooth out jaggies.

Matrix. A rectangular array of numbers. A matrix can be represented as a two-dimensional array,


with numbers arranged in rows and columns. An N-by-N matrix represents a linear transformation
from N-dimensional space to itself.

Page 4 of 14
FUNDAMENTALS OF MULTIMEDIA GRAPHICS & IMAGES, GITONGA MUNYI ©2020

Orthographic projection. A projection from 3D to 2D that simply discards the z-coordinate. It


projects objects along lines that are orthogonal (perpendicular) to the XY-plane.

Pixel. Short-form for 'picture element'. A pixel is the smallest element of a graphics display or the
smallest element of a rendered image. A digital image is made up of rows and columns of small
rectangles called pixels. To specify a digital image, a color is assigned to each pixel in the image.

Polygon. A multi-sided shape lying in a plane and specified by a list of points, called its vertices,
and made up of the line segments from each point in the list to the next point in the list, plus a line
segment from the last point in the list to the first point.

Raster graphics. Pixel-based graphics in which an image is specified by assigning a color to each
pixel in a grid of pixels.

Rendering. The process of producing a 2D image from a 3D scene description.

Page 5 of 14
FUNDAMENTALS OF MULTIMEDIA GRAPHICS & IMAGES, GITONGA MUNYI ©2020

Scaling. A geometric transform that multiplies each coordinate of a point by a number called the
scaling factor. Scaling increases or decreases the size of an object, but also moves its points closer
to or farther from the origin.
Vector graphics. Shape-based graphics in which an image is specified as a list of the shapes or
objects that appear in the image.
Vertex. One of the points that define a geometric primitive, such as the two endpoints of a line
segment or the three vertices of a triangle. (The plural is "vertices.") A vertex can be specified in
a coordinate system by giving its x and y coordinates in 2D graphics, or its x, y, and z coordinates
in 3D graphics.

Viewport. The rectangular area in which the image for 2D or 3D graphics is displayed. The
coordinates on the viewport are pixel coordinates, more properly called device coordinates since
they are actual physical coordinates on the device where the image is being displayed.

Page 6 of 14
FUNDAMENTALS OF MULTIMEDIA GRAPHICS & IMAGES, GITONGA MUNYI ©2020

Page 7 of 14
FUNDAMENTALS OF MULTIMEDIA GRAPHICS & IMAGES, GITONGA MUNYI ©2020

Wireframe. A style of drawing a polyhedron or polygonal mesh in which only the edges are
drawn, resulting in an image made up of line segments.

World coordinates. The coordinate system in which a scene is defined. The image that is
produced of the scene will show the contents of the world coordinate system that lie within some
view volume (for 3D) or view window (for 2D). Objects are defined in their own object coordinate
system. Modeling transformations are then applied to place objects into the scene; that is, they
transform object coordinates to world coordinates.

Advantages of Computer Graphics


1. A high-quality graphics displays of personal computer provide one of the most natural
means of communicating with a computer.
2. It has an ability to show moving pictures, and thus it is possible to produce animations with
computer graphics.
3. With computer graphics use can also control the animation by adjusting the speed, the
portion of the total scene in view, the geometric relationship of the objects in the scene to
one another, the amount of detail shown and so on.
4. The computer graphics also provides facility called update dynamics. With update
dynamics it is possible to change the shape, color or other properties of the objects being
viewed.

Page 8 of 14
FUNDAMENTALS OF MULTIMEDIA GRAPHICS & IMAGES, GITONGA MUNYI ©2020

5. With the recent development of digital signal processing (DSP) and audio synthesis chip
the interactive graphics can now provide audio feedback along with the graphical
feedbacks to make the simulated environment even more realistic.

Application of Computer Graphics

Computer Graphics has numerous applications, some of which are listed below:
1. Computer graphics user interfaces (GUIs) – A graphic, mouse-oriented paradigm
which allows the user to interact with a computer.
2. Business presentation graphics - "A picture is worth a thousand words".
3. Cartography - Drawing maps.
4. Weather Maps – Real-time mapping, symbolic representations.
5. Satellite Imaging - Geodesic images.
6. Photo Enhancement - Sharpening blurred photos.
7. Medical imaging - MRIs, CAT scans, etc. - Non-invasive internal examination.
8. Engineering drawings - mechanical, electrical, civil, etc. - Replacing the blueprints of
the past.
9. Typography - The use of character images in publishing - replacing the hard type of the
past.

Page 9 of 14
FUNDAMENTALS OF MULTIMEDIA GRAPHICS & IMAGES, GITONGA MUNYI ©2020

10. Art - Computers provide a new medium for artists.


11. Training - Flight simulators, computer aided instruction, etc.
12. Entertainment - Movies and games.
13. Simulation and modeling - Replacing physical modeling and enactments

Types of Computer Graphics

There are two kinds of computer graphics - raster (composed of pixels) and vector (composed
of paths). Raster images are more commonly called bitmap images.

A bitmap image uses a grid of individual pixels where each pixel can be a different color or
shade. Bitmaps are composed of pixels.

Vector graphics use mathematical relationships between points and the paths connecting them to
describe an image. Vector graphics are composed of paths.

The image to the left below is representative of a bitmap and the image to the right is
representative of a vector graphic. They are shown at four time’s actual size to exaggerate the
fact that the edges of a bitmap become jagged as it is scaled up:
Bitmap Image: Vector Graphic:

The larger you display a bitmap, the jagged it appears, while a vector image remains smooth at
any size. That is why PostScript and TrueType® fonts always appear smooth - they are vector-
based.

The jagged appearance of bitmap images can be partially overcome with the use of "anti-
aliasing". Anti-aliasing is the application of subtle transitions in the pixels along the edges of

Page 10 of 14
FUNDAMENTALS OF MULTIMEDIA GRAPHICS & IMAGES, GITONGA MUNYI ©2020

images to minimize the jagged effect (below left). A scalable vector image will always appear
smooth (below right):
Anti-Aliased Bitmap Image: Smooth Vector Image:

Bitmap images require higher resolutions and anti-aliasing for a smooth appearance. Vector-
based graphics on the other hand are mathematically described and appear smooth at any size or
resolution.
Bitmaps are best used for photographs and images with subtle shading. Graphics best suited for
the vector format are page layout, type, line art or illustrations.

Wherever possible use the vector format for all your type, line art and illustrations and only use
bitmaps for photos or images with complex or non-uniform shading.

Tasks /Quiz
1. What is a pixel in the context of computer graphics?
2. Elaborate on the general concept of computer graphics.
3. Describe application areas of computer graphics
4. Highlight any FIVE advantages of computer graphics.
5. Distinguish between vector and raster graphics.
6. What is “anti-aliasing” as used in computer graphics?

Multimedia Image Formats

Recall that an image consists of a rectangular array of dots called pixels. The size [resolution] of
the image is specified in terms of width * height, in numbers of the pixels. The physical size of
the image, in inches or centimeters, depends on the resolution of the device on which the image
is displayed. The resolution is usually measured in DPI (Dots Per Inch).
Page 11 of 14
FUNDAMENTALS OF MULTIMEDIA GRAPHICS & IMAGES, GITONGA MUNYI ©2020

An image will appear smaller on a device with a higher resolution than on one with a lower
resolution. For color images, one needs enough bits per pixel to represent all the colors in the
image. The number of the bits per pixel is called the depth of the image.

Image file formats

▪ GIF- Graphics Interchange Formats- The GIF format was created by Compuserve. It
supports 256 colors. GIF format is the most popular on the Internet because of its compact
size. It is ideal for small icons used for navigational purpose and simple diagrams. GIF
creates a table of up to 256 colors from a pool of 16 million. If the image has less than
256 colors, GIF can easily render the image without any loss of quality. When the image
contains more colors, GIF uses algorithms to match the colors of the image with the palette
of optimum set of 256 colors available. Better algorithms search the image to find and the
optimum set of 256 colors.

Thus, GIF format is lossless only for the image with 256 colors or less. In case of a rich,
true color image GIF may lose 99.998% of the colors. GIF files can be saved with a
maximum of 256 colors. This makes it is a poor format for photographic images.
GIFs can be animated, which is another reason they became so successful. Most animated
banner ads are GIFs. GIFs allow single bit transparency that is when you are creating your
image, you can specify which color is to be transparent. This provision allows the
background colors of the web page to be shown through the image.

Page 12 of 14
FUNDAMENTALS OF MULTIMEDIA GRAPHICS & IMAGES, GITONGA MUNYI ©2020

▪ JPEG- Joint Photographic Experts Group- The JPEG format was developed by the
Joint Photographic Experts Group. JPEG files are bitmapped images. It stores information
as 24-bit color. This is the format of choice for nearly all photograph images on the
internet. Digital cameras save images in a JPEG format by default. It has become the main
graphics file format for the World Wide Web and any browser can support it without plug-
ins. In order to make the file small, JPEG uses lossy compression. It works well on
photographs, artwork and similar materials but not so well on lettering, simple cartoons
or line drawings. JPEG images work much better than GIFs. Though JPEG can be
interlaced, still this format lacks many of the other special abilities of GIFs, like
animations and transparency, but they really are only for photos.

▪ PNG- Portable Network Graphics- PNG is the only lossless format that web browsers
support. PNG supports 8 bit, 24 bits, 32 bits and 48 bits data types. One version of the
format PNG-8 is similar to the GIF format. But PNG is the superior to the GIF. It produces
smaller files and with more options for colors. It supports partial transparency also. PNG-
24 is another flavor of PNG, with 24-bit color supports, allowing ranges of color akin to
high color JPEG. PNG-24 is in no way a replacement format for JPEG because it is a
lossless compression format. This means that file size can be rather big against a
comparable JPEG. Also, PNG supports for up to 48 bits of color information.
▪ TIFF- Tagged Image File Format- The TIFF format was developed by the Aldus
Corporation in the 1980 and was later supported by Microsoft. TIFF file format is widely
used bitmapped file format. It is supported by many image editing applications, software
used by scanners and photo retouching programs.
TIFF can store many different types of image ranging from 1-bit image, grayscale image,
8-bit color image, 24-bit RGB image etc. TIFF files originally use lossless compression.
Today TIFF files also use lossy compression according to the requirement. Therefore, it
is a very flexible format. This file format is suitable when the output is printed. Multi-

Page 13 of 14
FUNDAMENTALS OF MULTIMEDIA GRAPHICS & IMAGES, GITONGA MUNYI ©2020

page documents can be stored as a single TIFF file and that is way this file format is so
popular. The TIFF format is now used and controlled by Adobe.
▪ BMP- Bitmap- The bitmap file format (BMP) is a very basic format supported by most
Windows applications. BMP can store many different types of image: 1-bit image,
grayscale image, 8-bit color image, 24-bit RGB image etc. BMP files are uncompressed.
Therefore, these are not suitable for the internet. BMP files can be compressed using
lossless data compression algorithms.
▪ EPS- Encapsulated Postscript- The EPS format is a vector based graphic. EPS is popular
for saving image files because it can be imported into nearly any kind of application. This
file format is suitable for printed documents. Main disadvantage of this format is that it
requires more storage as compare to other formats.
▪ PDF- Portable Document Format- PDF format is vector graphics with embedded pixel
graphics with many compression options. When your document is ready to be shared with
others or for publication. This is only format that is platform independent. If you have
Adobe Acrobat you can print from any document to a PDF file. From illustrator you can
save as .PDF.
▪ EXIF- Exchange Image File- Exif is an image format for digital cameras. A variety of
tags are available to facilitate higher quality printing, since information about the camera
and picture - taking condition can be stored and used by printers for possible color
correction algorithms.it also includes specification of file format for audio that
accompanies digital images.
▪ WMF- Windows MetaFile- WMF is the vector file format for the MS-Windows
operating environment. It consists of a collection of graphics device interface function
calls to the MS-Windows graphics drawing library. Metafiles are both small and flexible
and can be displayed properly by their proprietary software’s only.
▪ PICT- PICT images are useful in Macintosh software development, but you should avoid
them in desktop publishing. Avoid using PICT format in electronic publishing-PICT
images are prone to corruption.
▪ Photoshop- This is the native Photoshop file format created by Adobe. You can import
this format directly into most desktop publishing applications.

Page 14 of 14

You might also like