Lec 9 Vector and Raster Graphics
Lec 9 Vector and Raster Graphics
graphics
2D image in digital format
format: raster (also known as bitmap) and vector.
Bitmap representations use one or more two-dimensional arrays
of pixels, advantages of bitmap graphics are:
their quality and display speed;
Disadvantages
larger memory storage requirements
size dependence (e.g., enlarging a bitmap image may lead to
noticeable artifacts).
vector representations use a series of drawing commands to
represent an image.
advantages
Vector representations require less memory and allow resizing
and geometric manipulations without introducing artifacts,
Disadvantages
need to be rasterized for most presentation devices.
2.1.1 Binary (1-Bit) Images
2.1.2 Gray-Level (8-Bit) Images
usually with 8 bits per pixel
2.1.3 Color Images
24-Bit (RGB) Color Images Color images can be
represented using three 2D arrays of same size,
one for each color channel: red (R), green (G),
and blue (B) (Figure 2.4).1 Each array element
contains an 8-bit value, indicating the amount
of red, green, or blue at that point in a [0, 255]
scale.
Color image (a) and its R (b), G (c), and B (d)
components
Indexed Color Images
Where are vector graphics used?
Outside of screen printing, Vector graphics are
used in text, logos, illustrations, symbols,
infographics, charts, and graphs.
They are created and edited in computer
programs such as Adobe Illustrator and, Corel
Draw. Typical formats for a vector file are .ai
(Adobe Illustrator file), .cdr (Corel Draw file) .eps or
.pdf. However, not all .eps or .pdf files are
automatically vector-based. To understand why,
we need to explore raster graphics.
Where are raster graphics used?
Photographs and scanned images are the most common examples of
raster graphics. Raster graphics often show more subtle changes in color,
tone, and value than vector graphics are able to achieve. Unlike a vector
graphic, it is impossible to take a small raster graphic and scale it up without
losing image quality.