You are on page 1of 27

CD 326: Computer Graphics

Lecture – 3 FRAME BUFFER

SALIM DIWANI
FRAME BUFFER
 Frame buffer is used in Raster Scan Display devices.
 Frame buffer is a large, contiguous piece of
computer memory. (It has about 2D Array
Structure)
 In the frame buffer current image detail is stored in
the form of bits (each bit for a single pixel).
 It may be part of main memory or spatial graphics
memory for modern system.

2
FRAME BUFFER
Type of frame buffer
 Monochromatic frame buffer
 Grey scale frame buffer
 Complex RGB frame buffer

3
MONOCHROMATIC FRAME BUFFER
(BLACK/WHITE SCREEN)
 Frame buffer for monochromatic monitor is a
simplest frame buffer model, where each pixel of
screen is reserved 1 bit of memory space.
 Frame buffer is analogous to computer screen.

4
MONOCHROMATIC FRAME BUFFER
(BLACK/WHITE SCREEN)
 Example:- Suppose that if you want to illuminate
the pixel(100,100) on the display screen in
monochromatic model with screen resolution
(1024*768). Then calculate the followings:-
1. Show the frame buffer arrangement of above
system.
2. Calculate the size of image for above system. If
user wants to display single pixel or 100 pixels
of the screen.
5
MONOCHROMATIC FRAME BUFFER
(BLACK/WHITE SCREEN)

6
MONOCHROMATIC FRAME BUFFER
(BLACK/WHITE SCREEN)
Pixel (100,100)
Size =
Single = multiple pixels
Size = 1024 x 768 bits
Convert to kilobytes
=1024 x 768/8
= 96 K Bytes
7
Frame Buffer (Grey Images)
 Grey images: various intensity level of light on a single
image. Some portion of image is darker, brighter or
more brighter.
 To display the gray images we need additional bit
planes depending upon the intensity level of light.
 Voltage regulator is used to control the intensity of
electron gun.
 If we have N bit plane frame buffer then we can
generate the (2N) level of intensities.
 Ranging from (0 – darkest 2N – 1 Brightest)

8
Frame Buffer (Grey Images)
 Level of Intensities for 3 bit Plane Buffer
23 = 8
Bits Intensity
0 0 0 Black (Darkest)
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1 White (Brightest)

9
Frame Buffer (Grey Images)

10
Frame Buffer (Grey Images)
Example: For a display with resolution (1024*768). If we
have 3 bits plane buffer for grey scale image
arrangement, then evaluate the followings:-
a. Level of grey scale intensities.
b. The size of the image.
c. The size of image, if a single pixel is drawn on screen.
d. The size of the image, if 100 pixels are drawn on screen.

11
Frame Buffer (Grey Images)
(1024 x 768)
3 bits Plane Frame Buffer
Bits Intensity
2N 0 0 0 Black (Darkest)
N=3 0 0 1
0 1 0
= 23 = 8 0 1 1
1 0 0
1 0 1
1 1 0
1 1 1 White (Brightest)

12
Frame Buffer (Grey Images)
b) Size = N x Resolution
= 3 x 1024 x 768 bits

c) 1-Pixel
= 3 x 1024 x 768 bits

d) 100-Pixel
= 3 x 1024 x 768 bits
13
Complex Color (RGB) Model
 Complex color model or 8 Bit Plane Per Color Model or
Full Color Model
 In color monitors, we are using 3 e guns to produce the
colors (single pixel is coated with Red, Green, and Blue
dot of phosphorous).
 More complex color coding is also possible with frame
buffer arrangement.

14
8 Bit Plane Per Color Frame Buffer Model (Full
Color Model)
 In frame buffer arrangement we can use 8 bit plane per
color frame buffer.
 R = 8 bits = 28 = 256 variants of red color
 G = 8 bits = 28 = 256 variants of green color
 B = 8 bits = 28 = 256 variants of blue color

Total colors = (28)3 = 224 = 16,777,216


This is called as full color frame buffer.

15
8 Bit Plane Per Color Frame Buffer Model (Full
Color Model)

Red Green Blue


Black 0 0 0
Red 1 0 0
Green 0 1 0
Blue 0 0 1
Yellow 1 1 0
Cyan 0 1 1
Magenta 1 0 1
White 1 1 1

16
8 Bit Plane Per Color Frame Buffer Model (Full
Color Model)
“Human Eye can differentiate up to 7,000,000 colors”
24 Bit Plane frame buffer can generate 16,777,216 colors

17
8 Bit Plane Per Color Frame Buffer Model (Full
Color Model)

18
8 Bit Plane Per Color Frame Buffer
Model (Full Color Model)
A simplest color monitor with resolution
(1024 x 768). Calculate the following:
a)Arrangement of frame buffer system
b)Size of the image on this coding system

19
8 Bit Plane Per Color Frame Buffer
Model (Full Color Model)

20
8 Bit Plane Per Color Frame Buffer
Model (Full Color Model)

b) 23 = 8
size = 3 x 1024 x 768
= 3 x 1024 x 768 bits

21
Hex Color Coding/ Color Packing/ Color
Encoding (For Full Color Model)

22
Quiz
1. Monochromatic screen can display the images of
a. Black/White images
b. Grey Scale images
c. RGB simplest color images
d. RGB complex images
2. Frame buffer is used only in raster scan methodology:-
Explain

23
Quiz
3. A user wants to display a single dot at the pixel position
(50, 100) with screen of (1024*768).
i. Draw the image of frame buffer
ii. What is the size of image.

24
Quiz
4. For a grey scale image system 4 bit plane frame buffer is
used. How many level of intensities can be generated
with this arrangement?

25
Quiz
5. To display a grey scale image of 3 bit frame buffer, it
needs how many electron guns?
6. For a screen with (1024 * 768) resolution. 4 bits frame
buffer is used to display a grey scale image.
a. Draw the image of frame buffer
b. What will be the size of image in this arrangement?

26
Quiz
7. How many e guns are used in simplest color RGB model
8. The color of the pixel is depend upon the color of light
(e gun) explain
9. The size of the image if user wants to display 8 pixels
with different colors generated by simplest RGB model.
The resolution of the screen is (1024 x 768)
a. Draw the image of frame buffer
b. What will be the size of image in this arrangement?
10. Draw table for level of intensities for 3 bit plane buffer,
from black (darkest) to white (brightest)

27

You might also like