In this chapter, you will learn - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

In this chapter, you will learn

Description:

... the simplest type of bitmap picture - Monochrome (i.e. B&W) Bitmap ... Therefore, a full screen (800 x 600) monochrome bitmap picture requires storage of ... – PowerPoint PPT presentation

Number of Views:21
Avg rating:3.0/5.0
Slides: 20
Provided by: LKS
Category:

less

Transcript and Presenter's Notes

Title: In this chapter, you will learn


1
In this chapter, you will learn
  • How computer handles graphic objects
  • The differences between a bitmap file and a
    vector file
  • The differences among different common graphic
    file formats

2
Handling Computer Graphics
  • Computer Handles data in binary format 0 or 1
    (bit)

28 256
216 65,535
224 16,777,216
232 4,294,967,296
3
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

4
To have a better understanding of bitmap
graphics, lets start with the simplest type of
bitmap picture - Monochrome (i.e. BW) Bitmap
5
BW Bitmap Graphics
  • A pixel can be Black or white (2 states)
  • So, 1 bit can be used to code the color

1111111111111 1111111111111 0001111111111 10111111
11111 1100011111111 1111000111111 1111110111111 11
11111000011 1111111111001 1111111111110 1111111111
110 1111111111111
1 - White 0 - Black
6
BW Bitmap Graphics
  • Therefore, a full screen (800 x 600) monochrome
    bitmap picture requires storage of
  • (800 x 600 x 1) bits
  • 480000 bits
  • 60000 bytes
  • 58.59 kB

7
Grayscale Bitmap Graphics
  • Grayscale graphics are created by using shades of
    gray
  • 8 levels of grayscale

How many bits should be used to represent the
gray colors of each pixel?
3 bits
8
256 colors Bitmap Graphics
  • How many bits are necessary to represent 256
    colors in each pixel?

8 bits
9
Question
  • How many bits are necessary to represent a 800 x
    600 graphic of 256 colors?

Number of bits used 800 x 600 x 8 bits
3,840,000 bits
(Storage required 468.75 kB)
The larger the resolution and the no. of colors,
the more storage spaces are required to hold the
graphic
10
Vector Graphics
  • A vector graphic is divided into objects
  • Each object is defined by the method of drawing
    it

This picture contains 3 objectsa line, a circle
and a rectangle
11
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!
12
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
13
Common Graphic File Format
  • Bitmap (.bmp) - a common graphic file
    formatcan 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!)

14
Jpeg Format (5kB)
Gif Format (26kB)
15
Comparison Table
16
How colors are represented?
  • 8-bit color means 28 256 different colors
  • 16-bit (High) color means 216 65535 different
    colors
  • 24-bit (True) color means 224 16777216
    different colors

The number of bits used to represent colors is
called color depth.
17
RGB Color Scheme
  • All colors are made up of 3 primary colors of
    light Red (R), Green (G) and Blue (B)
  • Different intensities of red, green and blue can
    mix up different colors
  • In computer, 8 bits are used to represent 256
    levels of each of these primary colors

18
Example
Http//www.phy.ntnu.edu.tw/hwang/image/rgbColor.h
tml
  • RGB(255,0,0) Red
  • RGB(0,255,0) Green
  • RGB(0,0,255)
  • RGB(0,0,0)
  • RGB(255,255,255)
  • RGB(255,0,255)

Blue
Black
White
Magenta
19
CMYK Color Scheme
  • For printing, publisher will find CMYK scheme
    more suitable for ink used.
  • CMYK represents 4 colors Cyan, Magenta, Yellow
    and blacK.
Write a Comment
User Comments (0)
About PowerShow.com