6
00000000 01100110 00000000 00011000 00000000 01000010 00111100 00000000 Graphics in a computers memory How a picture (i.e. a graphic) is stored in a computers memory A computer screen is made up of little dots, called PICture ELements. (pixels). If you make each dot on or off, you can build up a monochrome (black and white) picture. Also, off and on can be represented by binary 0 and 1. Here is a diagram that shows a small picture graphic represented by a binary number. Black and white allow ONE bit per pixel. Colour allows 8, 16 or even 24 bits per pixel.

Graphics in a computers memory How a picture (i.e. a graphic) is stored in a computers memory A computer screen is made up of little dots, called PICture

Embed Size (px)

Citation preview

Page 1: Graphics in a computers memory How a picture (i.e. a graphic) is stored in a computers memory A computer screen is made up of little dots, called PICture

0000000001100110000000000001100000000000010000100011110000000000

Graphics in a computers memory

How a picture (i.e. a graphic) is stored in a computers memory

A computer screen is made up of little dots, called PICture ELements. (pixels).

If you make each dot on or off, you can build up a monochrome (black and white) picture. Also, off and on can be represented by binary 0 and 1.

Here is a diagram that shows a small picture graphic represented by a binary number.

Black and white allow ONE bit per pixel. Colour allows 8, 16 or even 24 bits per pixel.

Page 2: Graphics in a computers memory How a picture (i.e. a graphic) is stored in a computers memory A computer screen is made up of little dots, called PICture

Each pixel has a certain number of bits allocated to it (the bit depth). Each pattern gives a different colour.

More than one bit per pixel

Here we have 8 bits per pixel.

1 1 0 0 1 0 1 1

Page 3: Graphics in a computers memory How a picture (i.e. a graphic) is stored in a computers memory A computer screen is made up of little dots, called PICture

Each pixel has a certain number of bits allocated to it (the bit depth). Each pattern gives a different colour.

4 bits give 2 = 16 colours 8 bits give 2 = 256 colours 0 0 0 0 White 0 0 0 0 0 0 0 0 White

0 0 0 1 Blue 0 0 0 0 0 0 0 1 Blue

0 0 1 0 Pink 0 0 0 0 0 0 1 0 Pink

0 0 1 1 Red 0 0 0 0 0 0 1 1 Red

0 1 0 0 Brown 0 0 0 0 0 1 0 0 Brown

0 1 0 1 “ 0 0 0 0 0 1 0 1 “

0 1 1 0 “ 0 0 0 0 0 1 1 0

0 1 1 1 0 0 0 0 0 1 1 1

1 0 0 0 0 0 0 0 1 0 0 0

1 0 0 1 0 0 0 0 1 0 0 1

1 0 1 0 0 0 0 0 1 0 1 0

1 0 1 1 0 0 0 0 1 0 1 1

1 1 0 0 0 0 0 0 1 1 0 0

1 1 0 1 0 0 0 0 1 1 0 1

1 1 1 0 “ 0 0 0 0 1 1 1 0

1 1 1 1 Black 0 0 0 0 1 1 1 1 “

1 1 1 1 1 1 1 1 Black

4 8 *

Page 4: Graphics in a computers memory How a picture (i.e. a graphic) is stored in a computers memory A computer screen is made up of little dots, called PICture

Line thickness

End coordinates

Start coordinates

Fill Pattern

Line colour

Etc

The program takes the mouse input and create the shape on screen

Vector Graphics

The software defines the objects

Page 5: Graphics in a computers memory How a picture (i.e. a graphic) is stored in a computers memory A computer screen is made up of little dots, called PICture

1200

800

Calculation 1

Calculate the storage requirements for a bit map which is 1200 by 800 pixels with a bit depth of 16 bits. Give the answer in Kb.

Solution

No of pixels = 1200 X 800 = 960000 pixels

Storage = 960000 X 16 bits

= 960000 X 2 bytes

= (960000X 2) / 1024 Kb = 1875 Kb

Page 6: Graphics in a computers memory How a picture (i.e. a graphic) is stored in a computers memory A computer screen is made up of little dots, called PICture

Calculation 2Calculate the storage requirements for a bit map which is 8 inches by 4 inches, resolution 400 dpi and with a bit depth of 24 bits. Give the answer in Mb to one decimal place.

Solution

No pixels = (8X400) X (4X400)

Storage = (8X400) X (4X400) X 24 bits

= (8X400) X (4X400) X 3 bytes

= (8X400) X (4X400) X 3 / 1024 Kb

= 15000 Kb

= 15000 / 1024 Mb

= 14.6 Mb

8 X 400

4 X 400