Please enable JavaScript.
Coggle requires JavaScript to display documents.
Representing Graphics (How a bitmapped graphic is represented (Represented…
Representing Graphics
How a bitmapped graphic is represented
Represented with pixels in a grid
Every pixels uses bits to store each pixel's colour
To use more colours you add more bits
Example of bitmap with two colours
0 0 0 1 1 0 0 0
0 0 1 0 0 1 0 0
0 1 0 0 0 0 1 0
1 0 0 0 0 0 0 1
1 0 0 0 0 0 0 1
1 1 1 1 1 1 1 1
1 0 0 0 0 0 0 1
1 0 0 0 0 0 0 1
Example of bitmap with more than two colours
00 00 00 11 11 00 00 00
00 00 11 00 00 11 00 00
00 11 01 01 01 01 11 00
10 11 01 01 01 01 11 10
10 11 01 01 01 01 11 10
10 10 10 10 10 10 10 10
10 01 01 01 01 01 01 10
10 01 01 01 01 01 01 10
Examples of different attributes
Height
Line colour
Width
Fill colour
Start x and y coordinates
Examples of different objects
Ellipse
Polygon
Rectangle
Line
How a vector graphic is represented
The picture is stored as a collection of mathematically determined shapes or objects
Each object in the picture has properties like height and width
Example of vector shape stored in a format called SVG
<rect width="500" height="200"..........
The advantages and disadvantages of using vector graphic representation
Advantages
Doesn't use a lot of space
Resolution independent
The size can be changed
Disadvantages
Bits can't be rubbed out
The advantages and disadvantages of using bitmapped graphic representation
Disadvantages
Uses a lot of memory
Can't change the size
Resolution dependent
Advantages
Manual tools like paint brushes
Uses spray type facilities
Pixels can be changed or rubbed out
Two types of graphics that can be stored on a computer: bitmap and vector