REPRESENTING IMAGES AND
GRAPHICS
• Color is often expressed in a computer as an RGB (red-
green-blue) value, which is actually three numbers that
indicate the relative contribution of each of these three
primary colors.
• For example, an RGB value of (255, 255, 0) maximizes the
contribution of red and green, and minimizes the
contribution of blue, which results in a bright yellow.
3-
51
REPRESENTING IMAGES AND
GRAPHICS
• A alternate set of components is yellow, magenta,and cyan
(YMC).
• This set is used for printers
• The next slide shows the relationship between the RGB
and YMC components
3-
52
REPRESENTING IMAGES AND
GRAPHICS
Figure 3.10 Three-dimensional color space 3-
53
REPRESENTING IMAGES AND
GRAPHICS
• The amount of data that is used to represent a color is
called the color depth.
• HiColor is a term that indicates a 16-bit color depth. Five
bits are used for each number in an RGB value and the
extra bit is sometimes used to represent transparency.
TrueColor indicates a 24-bit color depth.Therefore, each
number in an RGB value gets eight bits.
3-
54
REPRESENTING IMAGES AND
GRAPHICS
3-
55
INDEXED COLOR
• A particular application such as a browser may support
only a certain number of specific colors, creating a palette
from which to choose. For example, the Netscape
Navigator’s color palette is
Figure 3.11
The Netscape color palette
3-
56
DIGITIZED IMAGES AND
GRAPHICS
• Digitizing a picture is the act of representing it as a
collection of individual dots called pixels.
• The number of pixels used to represent a picture is called
the resolution.
• The storage of image information on a pixel-by-pixel basis
is called a raster-graphics format. Several popular raster
file formats including bitmap (BMP), GIF, and JPEG.
3-
57
DIGITIZED IMAGES AND
GRAPHICS
Figure 3.12 A digitized picture composed of many individual pixels. This is a very high 3-
resolution picture that would have a large file to be stored and transmitted. 58
DIGITIZED IMAGES AND
GRAPHICS
Figure 3.12 A digitized picture composed of many individual pixels. This is very low resolution 3-
version of the previous doggy picture. This file would be much smaller, but we would need a 59
compromise between the two cases.
VECTOR GRAPHICS
• Instead of assigning colors to pixels as we do in raster
graphics, a vector-graphics format describe an image in
terms of lines and geometric shapes.A vector graphic is a
series of commands that describe a line’s direction,
thickness, and color. For simple images like logos, the file
size for these formats can be very small.
3-
60
VECTOR GRAPHICS
• Vector graphics can be resized mathematically, and these
changes can be calculated dynamically as needed.
• However, vector graphics is not good for representing real-
world images.
• Different applications are used to edit graphs in the two
formats
• Adobe PhotoShop for raster
• Adobe Illustrator for vector
3-
61
REPRESENTING VIDEO
• Two types of compression, temporal and spatial.
Temporal compression A technique based
differences between consecutive frames. If most of an
image in two frames hasn’t changed, why should we
waste space to duplicate all of the similar
information?
Spatial compression A technique based on
removing redundant information within a frame.This
problem is essentially the same as that faced when
compressing still images.
3-
62